From 83ef9ebce816f062331d34be75018cc6ad59875e Mon Sep 17 00:00:00 2001 From: Antonio Scandurra Date: Thu, 4 May 2023 16:24:51 +0200 Subject: [PATCH] Merge pull request #2443 from zed-industries/fix-vim-mode-rename Avoid calling `update_window` twice in `blurred` event handler --- 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 4324bc6054..a11f1cc182 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)) }); }); }