@@ -293,6 +293,7 @@ impl Prompt {
293293 register: char,
294294 direction: CompletionDirection,
295295 ) {
296+ (self.callback_fn)(cx, &self.line, PromptEvent::Abort);
296297 let register = cx.editor.registers.get_mut(register).read();
297298
298299 if register.is_empty() {
@@ -314,6 +315,7 @@ impl Prompt {
314315 self.history_pos = Some(index);
315316
316317 self.move_end();
318+ (self.callback_fn)(cx, &self.line, PromptEvent::Update);
317319 self.recalculate_completion(cx.editor);
318320 }
319321
@@ -564,13 +566,11 @@ impl Component for Prompt {
564566 ctrl!('p') | key!(Up) => {
565567 if let Some(register) = self.history_register {
566568 self.change_history(cx, register, CompletionDirection::Backward);
567− (self.callback_fn)(cx, &self.line, PromptEvent::Update);
568569 }
569570 }
570571 ctrl!('n') | key!(Down) => {
571572 if let Some(register) = self.history_register {
572573 self.change_history(cx, register, CompletionDirection::Forward);
573− (self.callback_fn)(cx, &self.line, PromptEvent::Update);
574574 }
575575 }
576576 key!(Tab) => {