From 4244e7893f9faf361b344f691166c751b5ace83f Mon Sep 17 00:00:00 2001 From: Conrad Irwin Date: Mon, 18 Sep 2023 08:28:21 -0600 Subject: [PATCH] Clip twice --- crates/vim/src/motion.rs | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/crates/vim/src/motion.rs b/crates/vim/src/motion.rs index 209b43772f69a52d170c985accb81ff2e77ea7ea..08256bffb1d761221ab7ce3821d5b28a292c8a83 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(