Code at the speed of thought – Zed is a high-performance, multiplayer code editor from the creators of Atom and Tree-sitter.
vim: Fix hollow cursor being offset when selecting text (#11000)
DissolveDZd9eb3c4b35eb
diff --git a/crates/editor/src/element.rs b/crates/editor/src/element.rsindex 14e5af444aa..ada5e353e50 100644--- a/crates/editor/src/element.rs+++ b/crates/editor/src/element.rs@@ -89,7 +89,10 @@ impl SelectionLayout {}// any vim visual mode (including line mode)- if cursor_shape == CursorShape::Block && !range.is_empty() && !selection.reversed {+ if (cursor_shape == CursorShape::Block || cursor_shape == CursorShape::Hollow)+ && !range.is_empty()+ && !selection.reversed+ {if head.column() > 0 {head = map.clip_point(DisplayPoint::new(head.row(), head.column() - 1), Bias::Left)} else if head.row() > 0 && head != map.max_point() {