fix(wezterm): correctly calculate truncation check for tabbar

This commit is contained in:
Price Hiller 2023-12-07 04:19:37 -06:00
parent a3b3ca8042
commit 10e869744d
Signed by: Price
SSH Key Fingerprint: SHA256:Y4S9ZzYphRn1W1kbJerJFO6GGsfu9O70VaBSxJO7dF8

View File

@ -50,7 +50,7 @@ wezterm.on("format-tab-title", function(tab, tabs, panes, config, hover, max_wid
local edge_fg = color_names.kanagawa.oniViolet
local title = tab_title(tab)
if #title > max_width then
if #title > max_width - 1 then
title = " " .. wezterm.truncate_right(title, max_width - 6) .. "..."
else
title = " " .. title .. " "