mirror of
https://github.com/atuinsh/atuin.git
synced 2024-11-08 09:25:33 +01:00
Add some emacs movement keys (#857)
This commit is contained in:
parent
04044c4146
commit
bca1e64dd3
@ -86,6 +86,7 @@ impl State {
|
|||||||
}
|
}
|
||||||
|
|
||||||
#[allow(clippy::too_many_lines)]
|
#[allow(clippy::too_many_lines)]
|
||||||
|
#[allow(clippy::cognitive_complexity)]
|
||||||
fn handle_key_input(
|
fn handle_key_input(
|
||||||
&mut self,
|
&mut self,
|
||||||
settings: &Settings,
|
settings: &Settings,
|
||||||
@ -119,18 +120,30 @@ impl State {
|
|||||||
.search
|
.search
|
||||||
.input
|
.input
|
||||||
.prev_word(&settings.word_chars, settings.word_jump_mode),
|
.prev_word(&settings.word_chars, settings.word_jump_mode),
|
||||||
|
KeyCode::Char('b') if alt => self
|
||||||
|
.search
|
||||||
|
.input
|
||||||
|
.prev_word(&settings.word_chars, settings.word_jump_mode),
|
||||||
KeyCode::Left => {
|
KeyCode::Left => {
|
||||||
self.search.input.left();
|
self.search.input.left();
|
||||||
}
|
}
|
||||||
KeyCode::Char('h') if ctrl => {
|
KeyCode::Char('h') if ctrl => {
|
||||||
self.search.input.left();
|
self.search.input.left();
|
||||||
}
|
}
|
||||||
|
KeyCode::Char('b') if ctrl => {
|
||||||
|
self.search.input.left();
|
||||||
|
}
|
||||||
KeyCode::Right if ctrl => self
|
KeyCode::Right if ctrl => self
|
||||||
.search
|
.search
|
||||||
.input
|
.input
|
||||||
.next_word(&settings.word_chars, settings.word_jump_mode),
|
.next_word(&settings.word_chars, settings.word_jump_mode),
|
||||||
|
KeyCode::Char('f') if alt => self
|
||||||
|
.search
|
||||||
|
.input
|
||||||
|
.next_word(&settings.word_chars, settings.word_jump_mode),
|
||||||
KeyCode::Right => self.search.input.right(),
|
KeyCode::Right => self.search.input.right(),
|
||||||
KeyCode::Char('l') if ctrl => self.search.input.right(),
|
KeyCode::Char('l') if ctrl => self.search.input.right(),
|
||||||
|
KeyCode::Char('f') if ctrl => self.search.input.right(),
|
||||||
KeyCode::Char('a') if ctrl => self.search.input.start(),
|
KeyCode::Char('a') if ctrl => self.search.input.start(),
|
||||||
KeyCode::Home => self.search.input.start(),
|
KeyCode::Home => self.search.input.start(),
|
||||||
KeyCode::Char('e') if ctrl => self.search.input.end(),
|
KeyCode::Char('e') if ctrl => self.search.input.end(),
|
||||||
|
Loading…
Reference in New Issue
Block a user