From 0a2fc207111f66ef9990c1f6c0fd16b8de8cefbf Mon Sep 17 00:00:00 2001 From: "gcp-cherry-pick-bot[bot]" <98988430+gcp-cherry-pick-bot[bot]@users.noreply.github.com> Date: Tue, 28 Jan 2025 10:15:31 +0200 Subject: [PATCH] vim: Fix `NextSubwordEnd` crash (cherry-pick #23604) (#23760) Cherry-picked vim: Fix `NextSubwordEnd` crash (#23604) Closes #23550 Release Notes: - N/A Co-authored-by: CharlesChen0823 --- crates/vim/src/motion.rs | 1 + 1 file changed, 1 insertion(+) diff --git a/crates/vim/src/motion.rs b/crates/vim/src/motion.rs index 6539aab09f3f7c891953b039bb0eee6a270a7837..9e926ee50d0c31c02d739cd903add2bcb57d17b8 100644 --- a/crates/vim/src/motion.rs +++ b/crates/vim/src/motion.rs @@ -1653,6 +1653,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; }