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.

Fix for #25039 (#25138)

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