aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAram Drevekenin <aram@poor.dev>2026-02-20 15:54:35 +0100
committerGitHub <noreply@github.com>2026-02-20 15:54:35 +0100
commit7f8ca4a7ffaa2efb7dcd2e9c650188f45a734309 (patch)
tree2ef1f6298c2b89e6fb8b6ee3c207f066ffcda713
parent[Windows port PR3] refactor: replace RawFd/AsyncFile, introduce platform-spli... (diff)
downloadsl0ppij-7f8ca4a7ffaa2efb7dcd2e9c650188f45a734309.tar.gz
sl0ppij-7f8ca4a7ffaa2efb7dcd2e9c650188f45a734309.tar.xz
sl0ppij-7f8ca4a7ffaa2efb7dcd2e9c650188f45a734309.zip
fix: prevent watchers from stealing renders from non-watchers (#4739)
-rw-r--r--zellij-server/src/screen.rs13
1 files changed, 7 insertions, 6 deletions
diff --git a/zellij-server/src/screen.rs b/zellij-server/src/screen.rs
index 50f60a1f..aeee332a 100644
--- a/zellij-server/src/screen.rs
+++ b/zellij-server/src/screen.rs
@@ -1706,6 +1706,8 @@ impl Screen {
// Track whether non-watcher output was dirty for conditional watcher rendering
let non_watcher_output_was_dirty;
+ let mut tabs_to_close = vec![];
+
// === PHASE 1: Render for regular clients ===
if has_regular_clients {
let mut output = Output::new(
@@ -1715,7 +1717,6 @@ impl Screen {
self.osc8_hyperlinks,
);
- let mut tabs_to_close = vec![];
for (tab_index, tab) in &mut self.tabs {
if tab.has_selectable_tiled_panes() {
// Pass None for normal client rendering
@@ -1724,11 +1725,6 @@ impl Screen {
tabs_to_close.push(*tab_index);
}
}
- for tab_index in tabs_to_close {
- self.close_tab_by_id(tab_index)
- .context(err_context)
- .non_fatal();
- }
let pane_render_report = output.drain_pane_render_report();
let _ = self
@@ -1824,6 +1820,11 @@ impl Screen {
}
}
}
+ for tab_index in tabs_to_close {
+ self.close_tab_by_id(tab_index)
+ .context(err_context)
+ .non_fatal();
+ }
Ok(())
}