Allow input navigation with <Ctrl-f> and <Ctrl-b>

pull/154/head
sebashwa 2 years ago
parent dc9d7fd44f
commit f090dd07d5

@ -81,7 +81,7 @@ impl Input {
self.cursor_position -= compute_character_width(last_c); self.cursor_position -= compute_character_width(last_c);
return (Some(key), true); return (Some(key), true);
} }
Key::Right => { Key::Right | Key::Ctrl('f') => {
if self.cannot_go_right() { if self.cannot_go_right() {
return (Some(key), false); return (Some(key), false);
} }
@ -100,7 +100,7 @@ impl Input {
self.cursor_position = self.value_width(); self.cursor_position = self.value_width();
return (Some(key), true); return (Some(key), true);
} }
Key::Left => { Key::Left | Key::Ctrl('b') => {
if self.cannot_go_left() { if self.cannot_go_left() {
return (Some(key), false); return (Some(key), false);
} }

Loading…
Cancel
Save