Skip to content

Commit

Permalink
Add support for alt+backspace (remove prev word and alt+d (remove nex…
Browse files Browse the repository at this point in the history
…t word)
  • Loading branch information
paul-nameless committed Nov 23, 2024
1 parent c5c5e9d commit 49d81b2
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion crates/atuin/src/command/client/search/interactive.rs
Original file line number Diff line number Diff line change
Expand Up @@ -417,7 +417,7 @@ impl State {
KeyCode::Home => self.search.input.start(),
KeyCode::Char('e') if ctrl => self.search.input.end(),
KeyCode::End => self.search.input.end(),
KeyCode::Backspace if ctrl => self
KeyCode::Backspace if ctrl | alt => self
.search
.input
.remove_prev_word(&settings.word_chars, settings.word_jump_mode),
Expand Down Expand Up @@ -446,6 +446,10 @@ impl State {
KeyCode::Delete => {
self.search.input.remove();
}
KeyCode::Char('d') if alt => self
.search
.input
.remove_next_word(&settings.word_chars, settings.word_jump_mode),
KeyCode::Char('d') if ctrl => {
if self.search.input.as_str().is_empty() {
return InputAction::ReturnOriginal;
Expand Down

0 comments on commit 49d81b2

Please sign in to comment.