From 9b7bd4e9ae10238606b09a44b0d71904caee8784 Mon Sep 17 00:00:00 2001 From: Conrad Irwin Date: Fri, 29 Sep 2023 12:08:25 -0600 Subject: [PATCH] vim: Fix accidental visual selection when following --- crates/vim/src/vim.rs | 3 +++ 1 file changed, 3 insertions(+) diff --git a/crates/vim/src/vim.rs b/crates/vim/src/vim.rs index 6ff997a161..65410a460e 100644 --- a/crates/vim/src/vim.rs +++ b/crates/vim/src/vim.rs @@ -195,6 +195,9 @@ impl Vim { if editor_mode == EditorMode::Full && !newest_selection_empty && self.state().mode == Mode::Normal + // if leader_replica_id is set, then you're following someone else's cursor + // don't switch vim mode. + && editor.leader_replica_id().is_none() { self.switch_mode(Mode::Visual, true, cx); }