diff --git a/crates/editor/src/editor.rs b/crates/editor/src/editor.rs index 1ab978f3566e0c06a0f26be5193d91e097c6f68d..f0a4320c66ad568fecfb509a626cf6b9a2a52fd0 100644 --- a/crates/editor/src/editor.rs +++ b/crates/editor/src/editor.rs @@ -2429,7 +2429,7 @@ impl Editor { cx.notify(); return; } - if self.dismiss_menus_and_popups(true, cx) { + if self.dismiss_menus_and_popups(false, true, cx) { return; } @@ -2444,6 +2444,7 @@ impl Editor { pub fn dismiss_menus_and_popups( &mut self, + keep_inline_completion: bool, should_report_inline_completion_event: bool, cx: &mut ViewContext, ) -> bool { @@ -2467,7 +2468,9 @@ impl Editor { return true; } - if self.discard_inline_completion(should_report_inline_completion_event, cx) { + if !keep_inline_completion + && self.discard_inline_completion(should_report_inline_completion_event, cx) + { return true; } diff --git a/crates/vim/src/insert.rs b/crates/vim/src/insert.rs index b1e7af9b1057944d9f705499c2f8080e398feeea..061f96a46e5b4f8ad46a27f96e1acd67fbb0e4d7 100644 --- a/crates/vim/src/insert.rs +++ b/crates/vim/src/insert.rs @@ -22,7 +22,7 @@ impl Vim { if count <= 1 || Vim::globals(cx).dot_replaying { self.create_mark("^".into(), false, cx); self.update_editor(cx, |_, editor, cx| { - editor.dismiss_menus_and_popups(false, cx); + editor.dismiss_menus_and_popups(true, false, cx); editor.change_selections(Some(Autoscroll::fit()), cx, |s| { s.move_cursors_with(|map, mut cursor, _| { *cursor.column_mut() = cursor.column().saturating_sub(1);