Code at the speed of thought – Zed is a high-performance, multiplayer code editor from the creators of Atom and Tree-sitter.
Retain selection's head (as opposed to its end) on insertion
Antonio Scandurrae46d1549d686
diff --git a/crates/editor/src/editor.rs b/crates/editor/src/editor.rsindex 453468349be..0eefa7e0985 100644--- a/crates/editor/src/editor.rs+++ b/crates/editor/src/editor.rs@@ -2382,7 +2382,7 @@ impl Editor {old_selections.iter().map(|s| {- let anchor = snapshot.anchor_after(s.end);+ let anchor = snapshot.anchor_after(s.head());s.map(|_| anchor)}).collect::<Vec<_>>()