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.

Save a flushing line instead of discarding it

Piotr Osiewicz3e245fec9033
diff --git a/crates/editor/src/element.rs b/crates/editor/src/element.rs
index 82fbd194dba..e96f1efe926 100644
--- a/crates/editor/src/element.rs
+++ b/crates/editor/src/element.rs
@@ -1103,8 +1103,8 @@ impl EditorElement {
if let Some(current_end) = end_row.as_mut() {
if start_display.row() > *current_end + 1 {
push_region(start_row, end_row);
- start_row = None;
- end_row = None;
+ start_row = Some(start_display.row());
+ end_row = Some(end_display.row());
} else {
// Merge two hunks.
*current_end = end_display.row();