diff --git a/crates/vim/src/object.rs b/crates/vim/src/object.rs index 9218c6dff658710be5d49936bac9d4df7c96f8da..4523ec802cc26b9e68f586bfd5c4dd70084c9cb8 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; + } } }