aboutsummaryrefslogtreecommitdiffstats
path: root/zellij-server/src/output/mod.rs
diff options
context:
space:
mode:
authorAram Drevekenin <aram@poor.dev>2024-11-08 20:28:32 +0100
committerGitHub <noreply@github.com>2024-11-08 20:28:32 +0100
commit23d2555543acfbffac897e0afca85aff0ea66044 (patch)
tree300a7c595c203db5c7b99ec2a4c5afadfa03f57a /zellij-server/src/output/mod.rs
parentdocs(changelog): plugin fixes (diff)
downloadsl0ppij-23d2555543acfbffac897e0afca85aff0ea66044.tar.gz
sl0ppij-23d2555543acfbffac897e0afca85aff0ea66044.tar.xz
sl0ppij-23d2555543acfbffac897e0afca85aff0ea66044.zip
fix(output-buffer): truncate grid height when not rendering it fully (#3750)
* fix(output-buffer): truncate grid height when not rendering it fully * also fix for cases where the changed lines are not contiguous
Diffstat (limited to 'zellij-server/src/output/mod.rs')
-rw-r--r--zellij-server/src/output/mod.rs7
1 files changed, 6 insertions, 1 deletions
diff --git a/zellij-server/src/output/mod.rs b/zellij-server/src/output/mod.rs
index 7ad7a38b..ccb5f665 100644
--- a/zellij-server/src/output/mod.rs
+++ b/zellij-server/src/output/mod.rs
@@ -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 {