From 02503cf3be6660c436832edccd7073c8feaa40d8 Mon Sep 17 00:00:00 2001 From: CharlesChen0823 Date: Tue, 28 Jan 2025 14:13:13 +0800 Subject: [PATCH] vim: Fix `NextSubwordEnd` crash (#23604) Closes #23550 Release Notes: - N/A --- 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 35a7e35eb6..9da2238eaa 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; }