diff options
Diffstat (limited to 'default-plugins')
-rw-r--r-- | default-plugins/tab-bar/src/line.rs | 6 | ||||
-rw-r--r-- | default-plugins/tab-bar/src/main.rs | 1 |
2 files changed, 6 insertions, 1 deletions
diff --git a/default-plugins/tab-bar/src/line.rs b/default-plugins/tab-bar/src/line.rs index cb24873a9..668507a01 100644 --- a/default-plugins/tab-bar/src/line.rs +++ b/default-plugins/tab-bar/src/line.rs @@ -223,6 +223,7 @@ pub fn tab_line( cols: usize, palette: Palette, capabilities: PluginCapabilities, + hide_session_name: bool, ) -> Vec<LinePart> { let mut tabs_after_active = all_tabs.split_off(active_tab_index); let mut tabs_before_active = all_tabs; @@ -231,7 +232,10 @@ pub fn tab_line( } else { tabs_before_active.pop().unwrap() }; - let mut prefix = tab_line_prefix(session_name, palette, cols); + let mut prefix = match hide_session_name { + true => tab_line_prefix(None, palette, cols), + false => tab_line_prefix(session_name, palette, cols), + }; let prefix_len = get_current_title_len(&prefix); // if active tab alone won't fit in cols, don't draw any tabs diff --git a/default-plugins/tab-bar/src/main.rs b/default-plugins/tab-bar/src/main.rs index 6f0456a8f..2df6a13df 100644 --- a/default-plugins/tab-bar/src/main.rs +++ b/default-plugins/tab-bar/src/main.rs @@ -120,6 +120,7 @@ impl ZellijPlugin for State { cols.saturating_sub(1), self.mode_info.style.colors, self.mode_info.capabilities, + self.mode_info.style.hide_session_name, ); let mut s = String::new(); let mut len_cnt = 0; |