Code at the speed of thought – Zed is a high-performance, multiplayer code editor from the creators of Atom and Tree-sitter.
Fix subtraction with overflow (#33471)
Conrad Irwinb0798714282d
diff --git a/crates/vim/src/normal/convert.rs b/crates/vim/src/normal/convert.rsindex 31aac771c23..5295e79edb4 100644--- a/crates/vim/src/normal/convert.rs+++ b/crates/vim/src/normal/convert.rs@@ -220,7 +220,9 @@ impl Vim {}ranges.push(start..end);- if end.column == snapshot.line_len(MultiBufferRow(end.row)) {+ if end.column == snapshot.line_len(MultiBufferRow(end.row))+ && end.column > 0+ {end = snapshot.clip_point(end - Point::new(0, 1), Bias::Left);}cursor_positions.push(end..end)