mirror of
https://codeberg.org/dnkl/foot.git
synced 2026-02-05 04:06:08 -05:00
search: map ctrl+b/f to move cursor single character backward/forward
This commit is contained in:
parent
d87b791d81
commit
e2aeb7e515
1 changed files with 6 additions and 2 deletions
8
search.c
8
search.c
|
|
@ -357,7 +357,9 @@ search_input(struct terminal *term, uint32_t key, xkb_keysym_t sym, xkb_mod_mask
|
|||
}
|
||||
}
|
||||
|
||||
else if (mods == 0 && sym == XKB_KEY_Left) {
|
||||
else if ((mods == 0 && sym == XKB_KEY_Left) ||
|
||||
(mods == ctrl && sym == XKB_KEY_b))
|
||||
{
|
||||
if (term->search.cursor > 0)
|
||||
term->search.cursor--;
|
||||
}
|
||||
|
|
@ -371,7 +373,9 @@ search_input(struct terminal *term, uint32_t key, xkb_keysym_t sym, xkb_mod_mask
|
|||
assert(term->search.cursor <= term->search.len);
|
||||
}
|
||||
|
||||
else if (mods == 0 && sym == XKB_KEY_Right) {
|
||||
else if ((mods == 0 && sym == XKB_KEY_Right) ||
|
||||
(mods == ctrl && sym == XKB_KEY_f))
|
||||
{
|
||||
if (term->search.cursor < term->search.len)
|
||||
term->search.cursor++;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue