Skip to content

Commit

Permalink
Fix minimium tab bar width bug
Browse files Browse the repository at this point in the history
  • Loading branch information
dberlin committed May 5, 2024
1 parent 5b9ed1a commit 1c99c91
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 17 deletions.
30 changes: 15 additions & 15 deletions wezterm-gui/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand All @@ -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" }
Expand All @@ -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" }
Expand All @@ -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" }
Expand All @@ -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",
Expand Down
4 changes: 2 additions & 2 deletions wezterm-gui/src/tabbar.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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
};
Expand Down

0 comments on commit 1c99c91

Please sign in to comment.