Skip to content

Commit

Permalink
also fix for cases where the changed lines are not contiguous
Browse files Browse the repository at this point in the history
  • Loading branch information
imsnif committed Nov 8, 2024
1 parent 530c4d3 commit 8efbd81
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions zellij-server/src/output/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -941,9 +941,13 @@ 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();
line_changes.truncate(viewport_height);
let mut changed_chunks = Vec::new();
for line_index in line_changes {
let terminal_characters =
Expand Down

0 comments on commit 8efbd81

Please # to comment.