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

Add config option for scrolling the tab bar

This commit is contained in:
eaglgenes101 2023-03-10 09:38:51 -05:00 committed by Wez Furlong
parent 8755e731d3
commit 8308887d21
2 changed files with 7 additions and 2 deletions

View File

@ -404,6 +404,9 @@ pub struct Config {
#[dynamic(default)]
pub tab_bar_at_bottom: bool,
#[dynamic(default)]
pub scroll_tabs: bool,
/// If true, tab bar titles are prefixed with the tab index
#[dynamic(default = "default_true")]

View File

@ -448,8 +448,10 @@ impl super::TermWindow {
TabBarItem::Tab { .. } | TabBarItem::NewTabButton { .. } => {}
},
WMEK::VertWheel(n) => {
self.activate_tab_relative(if n < 1 { 1 } else { -1 }, true)
.ok();
if self.config.scroll_tabs {
self.activate_tab_relative(if n < 1 { 1 } else { -1 }, true)
.ok();
}
}
_ => {}
}