Reduce spamming of inline completion discard events (#11999)

I'm not a huge fan of passing around a boolean all around the place, but
this will tame the events for now until we have a better solution.

Release Notes:

- N/A
This commit is contained in:
Joseph T. Lyons 2024-05-17 16:37:17 -04:00 committed by GitHub
parent 99c6389ff8
commit e5a4421559
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
5 changed files with 57 additions and 42 deletions

View file

@ -16,7 +16,7 @@ fn normal_before(_: &mut Workspace, action: &NormalBefore, cx: &mut ViewContext<
vim.stop_recording_immediately(action.boxed_clone());
if count <= 1 || vim.workspace_state.replaying {
vim.update_active_editor(cx, |_, editor, cx| {
editor.dismiss_menus_and_popups(cx);
editor.dismiss_menus_and_popups(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);