Add config option for scrolling the tab bar

This commit is contained in:
eaglgenes101 authored and Wez Furlong committed 2023-03-21 22:09:14 -07:00
1 parent 8755e731d3
commit 8308887d21
2 files changed
+7 -2

No files matched your search

+3
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")]
+4 -2
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();
}
}
_ => {}
}