1
1
mirror of https://github.com/wez/wezterm.git synced 2024-11-23 23:21:08 +03:00

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.
This commit is contained in:
Wez Furlong 2020-05-04 08:39:55 -07:00
parent 921719267f
commit e74f467c39

View File

@ -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();
}
}
}