From fcb217b9e8a7c2bd147dc0aeea8f2d41361d783d Mon Sep 17 00:00:00 2001 From: Antonio Scandurra Date: Thu, 28 Oct 2021 11:32:10 +0200 Subject: [PATCH] Report `new_lines` extent correctly when coalescing edits --- crates/buffer/src/lib.rs | 1 + 1 file changed, 1 insertion(+) diff --git a/crates/buffer/src/lib.rs b/crates/buffer/src/lib.rs index 40610fcbc3..0ea8900037 100644 --- a/crates/buffer/src/lib.rs +++ b/crates/buffer/src/lib.rs @@ -2007,6 +2007,7 @@ impl<'a, F: FnMut(&FragmentSummary) -> bool> Iterator for Edits<'a, F> { if let Some(ref mut change) = change { if change.new_bytes.end == self.new_offset { change.new_bytes.end += fragment.len; + change.new_lines.end += fragment_lines; } else { break; }