Code at the speed of thought – Zed is a high-performance, multiplayer code editor from the creators of Atom and Tree-sitter.
helix: Prevent cursor move on entering insert mode (#33201)
vipexbe95716e9494
diff --git a/crates/vim/src/insert.rs b/crates/vim/src/insert.rsindex 585f324683d..a30af8769fa 100644--- a/crates/vim/src/insert.rs+++ b/crates/vim/src/insert.rs@@ -29,15 +29,20 @@ impl Vim {self.stop_recording_immediately(action.boxed_clone(), cx);if count <= 1 || Vim::globals(cx).dot_replaying {self.create_mark("^".into(), window, cx);+self.update_editor(window, cx, |_, editor, window, cx| {editor.dismiss_menus_and_popups(false, window, cx);- editor.change_selections(Some(Autoscroll::fit()), window, cx, |s| {- s.move_cursors_with(|map, mut cursor, _| {- *cursor.column_mut() = cursor.column().saturating_sub(1);- (map.clip_point(cursor, Bias::Left), SelectionGoal::None)++ if !HelixModeSetting::get_global(cx).0 {+ editor.change_selections(Some(Autoscroll::fit()), window, cx, |s| {+ s.move_cursors_with(|map, mut cursor, _| {+ *cursor.column_mut() = cursor.column().saturating_sub(1);+ (map.clip_point(cursor, Bias::Left), SelectionGoal::None)+ });});- });+ }});+if HelixModeSetting::get_global(cx).0 {self.switch_mode(Mode::HelixNormal, false, window, cx);} else {