Skip to content

armgit / zed

Public Imported from GitHub
0

Code at the speed of thought – Zed is a high-performance, multiplayer code editor from the creators of Atom and Tree-sitter.

Clip twice

Conrad Irwin4244e7893f9f
diff --git a/crates/vim/src/motion.rs b/crates/vim/src/motion.rs
index 209b43772f6..08256bffb1d 100644
--- a/crates/vim/src/motion.rs
+++ b/crates/vim/src/motion.rs
@@ -541,7 +541,8 @@ fn down(
.clip_point(FoldPoint::new(new_row, new_col), Bias::Left),
);
- (point, goal)
+ // clip twice to "clip at end of line"
+ (map.clip_point(point, Bias::Left), goal)
}
fn down_display(
@@ -581,7 +582,7 @@ pub(crate) fn up(
.clip_point(FoldPoint::new(new_row, new_col), Bias::Left),
);
- (point, goal)
+ (map.clip_point(point, Bias::Left), goal)
}
fn up_display(