From 1c99c9197ee2774de26eaafff4f45607ea253e7c Mon Sep 17 00:00:00 2001 From: Daniel Berlin Date: Wed, 31 Jan 2024 14:56:52 -0500 Subject: [PATCH] Fix minimium tab bar width bug --- wezterm-gui/Cargo.toml | 30 +++++++++++++++--------------- wezterm-gui/src/tabbar.rs | 4 ++-- 2 files changed, 17 insertions(+), 17 deletions(-) diff --git a/wezterm-gui/Cargo.toml b/wezterm-gui/Cargo.toml index 463f37267285..9dae8e6fe7d1 100644 --- a/wezterm-gui/Cargo.toml +++ b/wezterm-gui/Cargo.toml @@ -29,19 +29,19 @@ dhat-ad-hoc = ["dhat"] # if you are doing ad hoc profiling anyhow = "1.0" [target.'cfg(windows)'.build-dependencies] -embed-resource = "1.7" +embed-resource = "1.8" cc = "1.0" [dependencies] anyhow = "1.0" bitflags = "1.3" -bytemuck = { version="1.4", features=["derive"]} +bytemuck = { version="1.14", features=["derive"]} chrono = {version="0.4", default-features=false} -clap = {version="4.0", features=["derive"]} +clap = {version="4.4", features=["derive"]} codec = { path = "../codec" } colorgrad = "0.6" config = { path = "../config" } -downcast-rs = "1.0" +downcast-rs = "1.2" dhat = {version="0.3", optional=true} dirs-next = "2.0" emojis = "0.6" @@ -53,9 +53,9 @@ finl_unicode = "1.2" frecency = { path = "../frecency" } futures = "0.3" fuzzy-matcher = "0.3" -hdrhistogram = "7.1" +hdrhistogram = "7.5" http_req = "0.10" -image = "0.24.6" +image = "0.24.8" lazy_static = "1.4" libc = "0.2" lfucache = { path = "../lfucache" } @@ -65,21 +65,21 @@ metrics = { version="0.17", features=["std"]} mlua = {version="0.9", features=["send"]} mux = { path = "../mux" } mux-lua = { path = "../lua-api-crates/mux" } -once_cell = "1.8" -ordered-float = "4.1" +once_cell = "1.19" +ordered-float = "4.2" parking_lot = "0.12" portable-pty = { path = "../pty", features = ["serde_support"]} promise = { path = "../promise" } rangeset = { path = "../rangeset" } ratelim= { path = "../ratelim" } -rayon = "1.7" +rayon = "1.8" regex = "1" serde = {version="1.0", features = ["rc", "derive"]} serde_json = "1.0" -shlex = "1.1" -smol = "1.2" +shlex = "1.3" +smol = "1.3" tabout = { path = "../tabout" } -tempfile = "3.4" +tempfile = "3.9" terminfo = "0.8" termwiz = { path = "../termwiz" } termwiz-funcs = { path = "../lua-api-crates/termwiz-funcs" } @@ -88,7 +88,7 @@ thiserror = "1.0" tiny-skia = "0.11" umask = { path = "../umask" } unicode-normalization = "0.1" -unicode-segmentation = "1.8" +unicode-segmentation = "1.10" unicode-width = "0.1" url = "2" url-funcs = { path = "../lua-api-crates/url-funcs" } @@ -108,9 +108,9 @@ wgpu = "0.18" window = { path = "../window" } window-funcs = { path = "../lua-api-crates/window-funcs" } -[target."cfg(windows)".dependencies] +[target.'cfg(windows)'.dependencies] shared_library = "0.1" -uds_windows = "1.0" +uds_windows = "1.1" winapi = { version = "0.3", features = [ "winuser", "consoleapi", diff --git a/wezterm-gui/src/tabbar.rs b/wezterm-gui/src/tabbar.rs index 6f62e968caf9..2a9d4e49639c 100644 --- a/wezterm-gui/src/tabbar.rs +++ b/wezterm-gui/src/tabbar.rs @@ -323,11 +323,11 @@ impl TabBarState { // are symbols representing minimize, maximize and close. let mut active_tab_no = 0; - + let tab_info_len = tab_info.len().max(1); let config_tab_max_width = if config.tab_bar_fill { // We have no layout, so this is a rough estimate // The tab bar consists of the tab titles, the new tab button, and some padding - title_width.saturating_sub(new_tab.len() + 2 + tab_info.len()) / (tab_info.len()) + title_width.saturating_sub(new_tab.len() + 2 + tab_info_len) / (tab_info_len) } else { config.tab_max_width };