From 912a4cf54999ad0d7c72c936374df9f366461e18 Mon Sep 17 00:00:00 2001 From: Antonio Scandurra Date: Thu, 4 May 2023 16:18:01 +0200 Subject: [PATCH] Avoid calling `update_window` twice in `blurred` event handler This was preventing us from unhooking vim when performing a rename, which prevented typing in the rename editor. --- crates/vim/src/editor_events.rs | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/crates/vim/src/editor_events.rs b/crates/vim/src/editor_events.rs index 4324bc6054fde65c9384d900d14b1cfce046c310..a11f1cc182c64610ff588d46b51b142563b1abd7 100644 --- a/crates/vim/src/editor_events.rs +++ b/crates/vim/src/editor_events.rs @@ -35,9 +35,7 @@ fn blurred(EditorBlurred(editor): &EditorBlurred, cx: &mut AppContext) { } } - cx.update_window(editor.window_id(), |cx| { - editor.update(cx, |editor, cx| Vim::unhook_vim_settings(editor, cx)) - }); + editor.update(cx, |editor, cx| Vim::unhook_vim_settings(editor, cx)) }); }); }