aboutsummaryrefslogtreecommitdiff
path: root/helix-term/src/ui
diff options
context:
space:
mode:
authorshem2023-04-12 23:43:34 +0000
committerGitHub2023-04-12 23:43:34 +0000
commit9f680c69f42c239c8b01eba65a1c1e2dec7f7295 (patch)
treee5b7be2b936a5153a981050628e06118e1829223 /helix-term/src/ui
parent161fef2166e851071176e2fdaa9455efb5af0a6d (diff)
Fix #6669: Theme preview doesn't return theme to normal (#6694)
* Fix #6669: Theme preview doesn't return theme to normal when delete name with Alt-Backspace * Fix #6669: Return theme preview to normal theme for all remaining keybinds that change the promt text
Diffstat (limited to 'helix-term/src/ui')
-rw-r--r--helix-term/src/ui/prompt.rs18
1 files changed, 14 insertions, 4 deletions
diff --git a/helix-term/src/ui/prompt.rs b/helix-term/src/ui/prompt.rs
index 35ae8c2a..a9ccfb73 100644
--- a/helix-term/src/ui/prompt.rs
+++ b/helix-term/src/ui/prompt.rs
@@ -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);