Skip to content

Commit

Permalink
fix(output-buffer): truncate grid height when not rendering it fully (z…
Browse files Browse the repository at this point in the history
…ellij-org#3750)

* fix(output-buffer): truncate grid height when not rendering it fully

* also fix for cases where the changed lines are not contiguous
  • Loading branch information
imsnif committed Dec 31, 2024
1 parent 8e77a4d commit 03ab277
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion zellij-server/src/output/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -941,7 +941,12 @@ impl OutputBuffer {
}
changed_chunks
} else {
let mut line_changes: Vec<_> = self.changed_lines.iter().copied().collect();
let mut line_changes: Vec<_> = self
.changed_lines
.iter()
.filter(|i| *i < &viewport_height)
.copied()
.collect();
line_changes.sort_unstable();
let mut changed_chunks = Vec::new();
for line_index in line_changes {
Expand Down

0 comments on commit 03ab277

Please # to comment.