summaryrefslogtreecommitdiffstats
path: root/zellij-server/src/panes
diff options
context:
space:
mode:
authorTheo Salzmann <dev@on3iro.de>2023-04-18 16:33:20 +0200
committerGitHub <noreply@github.com>2023-04-18 16:33:20 +0200
commit525928b18a05d8662b5de7e85987428d84c0cb7d (patch)
tree03654c4d59cc6c1902ac90f3b497f2892c58f749 /zellij-server/src/panes
parentc7bd2ce9222d328369216ba287c57752910e0e88 (diff)
feat: Add layout configuration to exclude panes from tab sync (#2314)
Diffstat (limited to 'zellij-server/src/panes')
-rw-r--r--zellij-server/src/panes/plugin_pane.rs8
-rw-r--r--zellij-server/src/panes/terminal_pane.rs10
2 files changed, 18 insertions, 0 deletions
diff --git a/zellij-server/src/panes/plugin_pane.rs b/zellij-server/src/panes/plugin_pane.rs
index 980438c57..8a45c3c10 100644
--- a/zellij-server/src/panes/plugin_pane.rs
+++ b/zellij-server/src/panes/plugin_pane.rs
@@ -68,6 +68,7 @@ pub(crate) struct PluginPane {
prev_pane_name: String,
frame: HashMap<ClientId, PaneFrame>,
borderless: bool,
+ exclude_from_sync: bool,
pane_frame_color_override: Option<(PaletteColor, Option<String>)>,
invoked_with: Option<Run>,
loading_indication: LoadingIndication,
@@ -107,6 +108,7 @@ impl PluginPane {
prev_pane_name: pane_name,
terminal_emulator_colors,
terminal_emulator_color_codes,
+ exclude_from_sync: false,
link_handler,
character_cell_size,
sixel_image_store,
@@ -502,6 +504,12 @@ impl Pane for PluginPane {
fn borderless(&self) -> bool {
self.borderless
}
+ fn set_exclude_from_sync(&mut self, exclude_from_sync: bool) {
+ self.exclude_from_sync = exclude_from_sync;
+ }
+ fn exclude_from_sync(&self) -> bool {
+ self.exclude_from_sync
+ }
fn handle_right_click(&mut self, to: &Position, client_id: ClientId) {
self.send_plugin_instructions
.send(PluginInstruction::Update(vec![(
diff --git a/zellij-server/src/panes/terminal_pane.rs b/zellij-server/src/panes/terminal_pane.rs
index 469cfa093..0c1b55070 100644
--- a/zellij-server/src/panes/terminal_pane.rs
+++ b/zellij-server/src/panes/terminal_pane.rs
@@ -105,6 +105,7 @@ pub struct TerminalPane {
prev_pane_name: String,
frame: HashMap<ClientId, PaneFrame>,
borderless: bool,
+ exclude_from_sync: bool,
fake_cursor_locations: HashSet<(usize, usize)>, // (x, y) - these hold a record of previous fake cursors which we need to clear on render
search_term: String,
is_held: Option<(Option<i32>, IsFirstRun, RunCommand)>, // a "held" pane means that its command has either exited and the pane is waiting for a
@@ -602,6 +603,14 @@ impl Pane for TerminalPane {
self.borderless
}
+ fn set_exclude_from_sync(&mut self, exclude_from_sync: bool) {
+ self.exclude_from_sync = exclude_from_sync;
+ }
+
+ fn exclude_from_sync(&self) -> bool {
+ self.exclude_from_sync
+ }
+
fn mouse_left_click(&self, position: &Position, is_held: bool) -> Option<String> {
self.grid.mouse_left_click_signal(position, is_held)
}
@@ -756,6 +765,7 @@ impl TerminalPane {
pane_name: pane_name.clone(),
prev_pane_name: pane_name,
borderless: false,
+ exclude_from_sync: false,
fake_cursor_locations: HashSet::new(),
search_term: String::new(),
is_held: None,