1
1
mirror of https://github.com/wez/wezterm.git synced 2024-11-23 06:54:45 +03:00

docs: more adjustments for fancy tabs

This commit is contained in:
Wez Furlong 2022-01-01 17:35:27 -07:00
parent 24840f7e13
commit 6502aa54d6
3 changed files with 8 additions and 3 deletions

View File

@ -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

View File

@ -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 {

View File

@ -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 {