Clip right when moving to next word in case we land on a block line

Antonio Scandurra created

Change summary

crates/editor/src/movement.rs | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

Detailed changes

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 {