fix: When cycling through prompt history, update event needs to trigger

pull/924/head
Blaž Hrastnik 3 years ago
parent 2cee0c58ba
commit 1066b081dd

@ -501,6 +501,7 @@ impl Component for Prompt {
if let Some(register) = self.history_register { if let Some(register) = self.history_register {
let register = cx.editor.registers.get_mut(register); let register = cx.editor.registers.get_mut(register);
self.change_history(register.read(), CompletionDirection::Backward); self.change_history(register.read(), CompletionDirection::Backward);
(self.callback_fn)(cx, &self.line, PromptEvent::Update);
} }
} }
KeyEvent { KeyEvent {
@ -514,6 +515,7 @@ impl Component for Prompt {
if let Some(register) = self.history_register { if let Some(register) = self.history_register {
let register = cx.editor.registers.get_mut(register); let register = cx.editor.registers.get_mut(register);
self.change_history(register.read(), CompletionDirection::Forward); self.change_history(register.read(), CompletionDirection::Forward);
(self.callback_fn)(cx, &self.line, PromptEvent::Update);
} }
} }
KeyEvent { KeyEvent {

Loading…
Cancel
Save