mirror of
https://codeberg.org/dnkl/foot.git
synced 2026-06-07 03:01:51 -04:00
port fixes from foot/master
This commit is contained in:
parent
eba65d430e
commit
2b17abff3d
1 changed files with 33 additions and 23 deletions
14
vimode.c
14
vimode.c
|
|
@ -502,8 +502,17 @@ static ssize_t matches_cell(const struct terminal *term,
|
|||
if (composed == NULL && base == 0 && buf[search_ofs] == U' ')
|
||||
return 1;
|
||||
|
||||
if (c32ncasecmp(&base, buf, 1) != 0)
|
||||
// Search is case sensitive if the search buffer contains any
|
||||
// uppercase characters.
|
||||
if (hasc32upper(buf)) {
|
||||
if (c32ncmp(&base, buf + search_ofs, 1) != 0) {
|
||||
return -1;
|
||||
}
|
||||
} else {
|
||||
if (c32ncasecmp(&base, buf + search_ofs, 1) != 0) {
|
||||
return -1;
|
||||
}
|
||||
}
|
||||
|
||||
if (composed != NULL) {
|
||||
if (search_ofs + composed->count > len)
|
||||
|
|
@ -1737,7 +1746,8 @@ void vimode_input(struct seat *seat, struct terminal *term,
|
|||
count = xkb_compose_state_get_utf8(seat->kbd.xkb_compose_state,
|
||||
(char *)buf, sizeof(buf));
|
||||
xkb_compose_state_reset(seat->kbd.xkb_compose_state);
|
||||
} else if (compose_status == XKB_COMPOSE_CANCELLED) {
|
||||
} else if (compose_status == XKB_COMPOSE_CANCELLED ||
|
||||
compose_status == XKB_COMPOSE_COMPOSING) {
|
||||
count = 0;
|
||||
} else {
|
||||
count = xkb_state_key_get_utf8(seat->kbd.xkb_state, key,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue