From 2b31a48ef96dc4097f41f5e69e256b8a1165d64b Mon Sep 17 00:00:00 2001 From: Antonio Scandurra Date: Mon, 3 Jan 2022 16:26:42 +0100 Subject: [PATCH] Clip right when moving to next word in case we land on a block line --- crates/editor/src/movement.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/crates/editor/src/movement.rs b/crates/editor/src/movement.rs index 217b1e63e4f53dc1ac0766950bf9d31cf03bfa1c..466b6e932390fc7b0ae1e1da286fb455f50be634 100644 --- a/crates/editor/src/movement.rs +++ b/crates/editor/src/movement.rs @@ -172,7 +172,7 @@ pub fn next_word_boundary(map: &DisplaySnapshot, mut point: DisplayPoint) -> Dis } prev_char_kind = Some(char_kind); } - point + map.clip_point(point, Bias::Right) } pub fn is_inside_word(map: &DisplaySnapshot, point: DisplayPoint) -> bool {