diff options
| author | Aram Drevekenin <aram@poor.dev> | 2024-11-08 20:28:32 +0100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2024-11-08 20:28:32 +0100 |
| commit | 23d2555543acfbffac897e0afca85aff0ea66044 (patch) | |
| tree | 300a7c595c203db5c7b99ec2a4c5afadfa03f57a /zellij-server/src/output | |
| parent | docs(changelog): plugin fixes (diff) | |
| download | sl0ppij-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')
| -rw-r--r-- | zellij-server/src/output/mod.rs | 7 |
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 { |
