From e74f467c396767a776c22ab640c77b938bf268ff Mon Sep 17 00:00:00 2001 From: Wez Furlong Date: Mon, 4 May 2020 08:39:55 -0700 Subject: [PATCH] correctly fix #173 The real problem was an inconsistency in computing the tab bar enablement state. This makes the math the same in both places and re-enables the `hide_tab_bar_if_only_one_tab` option. --- src/frontend/gui/termwindow.rs | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/src/frontend/gui/termwindow.rs b/src/frontend/gui/termwindow.rs index 4c2605602..ac294bbd7 100644 --- a/src/frontend/gui/termwindow.rs +++ b/src/frontend/gui/termwindow.rs @@ -858,8 +858,11 @@ impl TermWindow { Some(window) => window, _ => return, }; - self.show_tab_bar = - config.enable_tab_bar && (window.len() > 1) || !config.hide_tab_bar_if_only_one_tab; + if window.len() == 1 { + self.show_tab_bar = config.enable_tab_bar && !config.hide_tab_bar_if_only_one_tab; + } else { + self.show_tab_bar = config.enable_tab_bar; + } self.show_scroll_bar = config.enable_scroll_bar; self.shape_cache.borrow_mut().clear(); @@ -950,7 +953,7 @@ impl TermWindow { // to piggy back on the config reloading code for that, so that // is what we're doing. if show_tab_bar != self.show_tab_bar { - self.check_for_config_reload(); + self.config_was_reloaded(); } } }