diff options
Diffstat (limited to 'default-plugins')
-rw-r--r-- | default-plugins/tab-bar/src/main.rs | 2 | ||||
-rw-r--r-- | default-plugins/tab-bar/src/tab.rs | 13 |
2 files changed, 12 insertions, 3 deletions
diff --git a/default-plugins/tab-bar/src/main.rs b/default-plugins/tab-bar/src/main.rs index 5a77ebaca..f059d20ef 100644 --- a/default-plugins/tab-bar/src/main.rs +++ b/default-plugins/tab-bar/src/main.rs @@ -65,7 +65,7 @@ impl ZellijPlugin for State { } else if t.active { active_tab_index = t.position; } - let tab = tab_style(tabname, t.active, t.position); + let tab = tab_style(tabname, t.active, t.position, t.is_sync_panes_active); all_tabs.push(tab); } let tab_line = tab_line(all_tabs, active_tab_index, cols); diff --git a/default-plugins/tab-bar/src/tab.rs b/default-plugins/tab-bar/src/tab.rs index a4c7c3762..0bc143b7a 100644 --- a/default-plugins/tab-bar/src/tab.rs +++ b/default-plugins/tab-bar/src/tab.rs @@ -40,9 +40,18 @@ pub fn non_active_tab(text: String) -> LinePart { } } -pub fn tab_style(text: String, is_active_tab: bool, position: usize) -> LinePart { +pub fn tab_style( + text: String, + is_active_tab: bool, + position: usize, + is_sync_panes_active: bool, +) -> LinePart { + let sync_text = match is_sync_panes_active { + true => " (Sync)".to_string(), + false => "".to_string(), + }; let tab_text = if text.is_empty() { - format!("Tab #{}", position + 1) + format!("Tab #{}{}", position + 1, sync_text) } else { text }; |