Skip to content

Commit

Permalink
Fix helix-editor#6669: Theme preview doesn't return theme to normal (h…
Browse files Browse the repository at this point in the history
…elix-editor#6694)

* Fix helix-editor#6669: Theme preview doesn't return theme to normal when delete name with Alt-Backspace

* Fix helix-editor#6669: Return theme preview to normal theme for all remaining keybinds that change the promt text
  • Loading branch information
h1t authored and Schuyler Mortimer committed Jul 10, 2024
1 parent 0624765 commit 8c0654e
Showing 1 changed file with 14 additions and 4 deletions.
18 changes: 14 additions & 4 deletions helix-term/src/ui/prompt.rs
Original file line number Diff line number Diff line change
Expand Up @@ -511,11 +511,21 @@ impl Component for Prompt {
ctrl!('e') | key!(End) => self.move_end(),
ctrl!('a') | key!(Home) => self.move_start(),
ctrl!('w') | alt!(Backspace) | ctrl!(Backspace) => {
self.delete_word_backwards(cx.editor)
self.delete_word_backwards(cx.editor);
(self.callback_fn)(cx, &self.line, PromptEvent::Update);
}
alt!('d') | alt!(Delete) | ctrl!(Delete) => {
self.delete_word_forwards(cx.editor);
(self.callback_fn)(cx, &self.line, PromptEvent::Update);
}
ctrl!('k') => {
self.kill_to_end_of_line(cx.editor);
(self.callback_fn)(cx, &self.line, PromptEvent::Update);
}
ctrl!('u') => {
self.kill_to_start_of_line(cx.editor);
(self.callback_fn)(cx, &self.line, PromptEvent::Update);
}
alt!('d') | alt!(Delete) | ctrl!(Delete) => self.delete_word_forwards(cx.editor),
ctrl!('k') => self.kill_to_end_of_line(cx.editor),
ctrl!('u') => self.kill_to_start_of_line(cx.editor),
ctrl!('h') | key!(Backspace) | shift!(Backspace) => {
self.delete_char_backwards(cx.editor);
(self.callback_fn)(cx, &self.line, PromptEvent::Update);
Expand Down

0 comments on commit 8c0654e

Please sign in to comment.