diff options
Diffstat (limited to 'default-plugins/tab-bar/src/line.rs')
-rw-r--r-- | default-plugins/tab-bar/src/line.rs | 6 |
1 files changed, 5 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 |