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.

vim: Fix `NextSubwordEnd` crash (#23604)

CharlesChen082302503cf3be66
diff --git a/crates/vim/src/motion.rs b/crates/vim/src/motion.rs
index 35a7e35eb69..9da2238eaae 100644
--- a/crates/vim/src/motion.rs
+++ b/crates/vim/src/motion.rs
@@ -1675,6 +1675,7 @@ pub(crate) fn next_subword_end(
if need_backtrack {
*new_point.column_mut() -= 1;
}
+ let new_point = map.clip_point(new_point, Bias::Left);
if point == new_point {
break;
}