Skip to content

armgit / zed

Public Imported from GitHub
0

Code at the speed of thought – Zed is a high-performance, multiplayer code editor from the creators of Atom and Tree-sitter.

vim: Only focus when associated editor is also focused (#41487)

Dinof3a5ebc31501
diff --git a/crates/vim/src/vim.rs b/crates/vim/src/vim.rs
index 91ce66d43e7..3310c1dab1a 100644
--- a/crates/vim/src/vim.rs
+++ b/crates/vim/src/vim.rs
@@ -944,9 +944,11 @@ impl Vim {
change_list::register(editor, cx);
digraph::register(editor, cx);
- cx.defer_in(window, |vim, window, cx| {
- vim.focused(false, window, cx);
- })
+ if editor.is_focused(window) {
+ cx.defer_in(window, |vim, window, cx| {
+ vim.focused(false, window, cx);
+ })
+ }
})
}