From 6502aa54d67d3a438aba829816c9aef5d327362e Mon Sep 17 00:00:00 2001 From: Wez Furlong Date: Sat, 1 Jan 2022 17:35:27 -0700 Subject: [PATCH] docs: more adjustments for fancy tabs --- docs/config/appearance.md | 2 ++ docs/config/lua/config/tab_max_width.md | 5 ++++- docs/config/lua/window-events/format-tab-title.md | 4 ++-- 3 files changed, 8 insertions(+), 3 deletions(-) diff --git a/docs/config/appearance.md b/docs/config/appearance.md index 76265809c..cbdaf6af0 100644 --- a/docs/config/appearance.md +++ b/docs/config/appearance.md @@ -168,6 +168,8 @@ details. causes the tab bar to be hidden when there is only a single tab. * [tab_bar_at_bottom](lua/config/tab_bar_at_bottom.md) places the tab bar at the bottom of the window instead of the top +* [tab_max_width](lua/config/tab_max_width.md) sets the maximum width, measured in cells, + of a given tab when using retro tab mode. #### Native (Fancy) Tab Bar appearance diff --git a/docs/config/lua/config/tab_max_width.md b/docs/config/lua/config/tab_max_width.md index 74f89efa4..6ea10c048 100644 --- a/docs/config/lua/config/tab_max_width.md +++ b/docs/config/lua/config/tab_max_width.md @@ -1,7 +1,10 @@ # `tab_max_width` Specifies the maximum width that a tab can have in the -tab bar. Defaults to 16 glyphs in width. +tab bar when using retro tab mode. It is ignored when +using fancy tab mode. + +Defaults to 16 glyphs in width. ```lua return { diff --git a/docs/config/lua/window-events/format-tab-title.md b/docs/config/lua/window-events/format-tab-title.md index df08a58f9..2c8868782 100644 --- a/docs/config/lua/window-events/format-tab-title.md +++ b/docs/config/lua/window-events/format-tab-title.md @@ -39,7 +39,7 @@ The parameters to the event are: * `panes` - an array containing [PaneInformation](../PaneInformation.md) for each of the panes in the active tab * `config` - the effective configuration for the window * `hover` - true if the current tab is in the hover state -* `max_width` - the maximum number of cells available to draw this tab +* `max_width` - the maximum number of cells available to draw this tab when using the retro tab bar style. The return value of the event can be: @@ -88,7 +88,7 @@ wezterm.on("format-tab-title", function(tab, tabs, panes, config, hover, max_wid local edge_foreground = background -- ensure that the titles fit in the available space, - -- and that we have room for the edges + -- and that we have room for the edges. local title = wezterm.truncate_to_width(tab.active_pane.title, max_width-2) return {