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

This commit is contained in:
Blaž Hrastnik 2021-10-27 18:23:17 +09:00
parent 2cee0c58ba
commit 1066b081dd

View file

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