refactor(wezterm): use ellipsis for cut off on tab titles
This commit is contained in:
parent
eaf35f18c1
commit
bb5e22c572
@ -1,6 +1,5 @@
|
|||||||
local wezterm = require("wezterm")
|
local wezterm = require("wezterm")
|
||||||
local color_names = require("config.theme.colors").color_names
|
local color_names = require("config.theme.colors").color_names
|
||||||
local log = require("lib.log")
|
|
||||||
|
|
||||||
local edges = {
|
local edges = {
|
||||||
solid = {
|
solid = {
|
||||||
@ -49,7 +48,7 @@ wezterm.on("format-tab-title", function(tab, tabs, panes, config, hover, max_wid
|
|||||||
|
|
||||||
local title = tab_title(tab)
|
local title = tab_title(tab)
|
||||||
if #title > max_width - 1 then
|
if #title > max_width - 1 then
|
||||||
title = " " .. wezterm.truncate_right(title, max_width - 6) .. "..."
|
title = " " .. wezterm.truncate_right(title, max_width - 6) .. "…"
|
||||||
else
|
else
|
||||||
title = " " .. title .. " "
|
title = " " .. title .. " "
|
||||||
end
|
end
|
||||||
|
Loading…
Reference in New Issue
Block a user