diff options
| author | user <user@clank> | 2026-09-22 14:49:40 +0200 |
|---|---|---|
| committer | user <user@clank> | 2026-09-22 14:49:40 +0200 |
| commit | 9f751ab432ae74d4462fb4c3fefbd85415f47c86 (patch) | |
| tree | e6a648f5a973b3817d416dbb07dabfa0786aca40 /src | |
| parent | sidebar: the tab number at the far edge (tab_bar_index) (diff) | |
| download | slosh-9f751ab432ae74d4462fb4c3fefbd85415f47c86.tar.gz slosh-9f751ab432ae74d4462fb4c3fefbd85415f47c86.tar.xz slosh-9f751ab432ae74d4462fb4c3fefbd85415f47c86.zip | |
sidebar: align the numbers by default
The knob landed defaulting to "prefix" on the grounds that it is what the
strip has always drawn -- but the strip is not what this is about. A sidebar
row is wider than the name on it, and `1:api` spends the first two or three
cells of every row (three or four once you have ten tabs) on a number nobody
reads until they reach for C-a 2, pushing the names in by a distance that
depends on how many tabs are open. Right-aligned, the names start where the
statuses under them start and the numbers make a column of their own.
`tab_bar_index "prefix"` is still there and unchanged, and the top strip is
unaffected either way -- it ignores the setting, having no far end to align
against.
The tests that used `1:` as the anchor for "where a tab's name starts" now
anchor on the name, which is what they were about; two new ones cover the
default and the prefix form explicitly, so neither mode is tested only by
being the default.
Diffstat (limited to 'src')
| -rw-r--r-- | src/config.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/config.c b/src/config.c index 1297856..a1d8880 100644 --- a/src/config.c +++ b/src/config.c @@ -951,7 +951,7 @@ void config_defaults(config_t *c) { c->modal_scrim = 120; c->status_bar = true; c->tab_bar_side = TAB_BAR_TOP; - c->tab_bar_index = TAB_INDEX_PREFIX; + c->tab_bar_index = TAB_INDEX_RIGHT; /* Wide enough for " 12:a-real-name " plus a bell; narrow enough that a * 100-column terminal keeps a working layout beside it. */ c->tab_bar_width = 18; @@ -1711,8 +1711,8 @@ char *config_render(const config_t *c) { : c->tab_bar_side == TAB_BAR_RIGHT ? "right" : "top"); cb_add(&b, - "tab_bar_index \"%s\" // 1:name, or the number at the sidebar's far " - "edge\n", + "tab_bar_index \"%s\" // the sidebar's number at its far edge, or " + "1:name\n", c->tab_bar_index == TAB_INDEX_RIGHT ? "right" : "prefix"); cb_add(&b, "tab_bar_width %u // columns a sidebar takes\n", c->tab_bar_width); |
