From 13da468e22c1c5db3399219ebd3e20ecdcecc9ad Mon Sep 17 00:00:00 2001 From: Conrad Irwin Date: Tue, 18 Feb 2025 23:24:54 -0700 Subject: [PATCH] Fix for #25039 (#25138) Release Notes: - vim: Fix crash in `ci{` --- crates/vim/src/object.rs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/crates/vim/src/object.rs b/crates/vim/src/object.rs index 9218c6dff6..4523ec802c 100644 --- a/crates/vim/src/object.rs +++ b/crates/vim/src/object.rs @@ -1546,7 +1546,9 @@ fn surrounding_markers( } // Adjust closing.start to exclude whitespace after a newline, if present if let Some(end) = last_newline_end { - closing.start = end; + if end > opening.end { + closing.start = end; + } } }