diff options
| author | user <user@clank> | 2026-09-10 15:40:09 +0200 |
|---|---|---|
| committer | user <user@clank> | 2026-09-10 15:40:09 +0200 |
| commit | 9c5b3319ac4d9a63404fe0cf0d55320754c982ba (patch) | |
| tree | 28e0020a92a55512120467d698bcc09a95e8e17a /src/app_ui.c | |
| parent | build: a vendor bump rebuilds libghostty-vt, everywhere it is consumed (diff) | |
| download | slosh-9c5b3319ac4d9a63404fe0cf0d55320754c982ba.tar.gz slosh-9c5b3319ac4d9a63404fe0cf0d55320754c982ba.tar.xz slosh-9c5b3319ac4d9a63404fe0cf0d55320754c982ba.zip | |
tabs: the strip can stand on its side (tab_bar_side left/right)
A sidebar lists one tab per row down the chosen edge, tab_bar_width
columns wide; the panes trade the strip's row for the sidebar's columns
in tab_area(), the one place that arithmetic lives. The per-tab cell
drawing is extracted from draw_tab_strip (label, rename editor, bell,
hover, drop states, hit) and shared, so every mouse verb -- click,
double-click rename, drag to a tab, drop on + -- works in both shapes
because the hits move with the cells.
The strip's indicators (pane count, prefix badge) take the sidebar's
bottom rows, reserved first under the same budgeting rule the strip
applies from the right. The status line below keeps the full width. A
terminal too narrow to give up the columns falls back to top, re-derived
per frame, so a resize moves the bar without anyone storing state.
Diffstat (limited to 'src/app_ui.c')
| -rw-r--r-- | src/app_ui.c | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/src/app_ui.c b/src/app_ui.c index 11e667a..4e67003 100644 --- a/src/app_ui.c +++ b/src/app_ui.c @@ -1141,7 +1141,15 @@ void app_compose(app_t *a, screen_t *s) { layout(a); find_corners(a); - if (CFG.status_bar) draw_tab_strip(a, s); + if (CFG.status_bar) { + /* The side is re-derived, not stored: a terminal that shrank below the + * sidebar's budget draws the strip on top this frame, and the layout + * above made the same call from the same numbers. */ + if (app_tab_bar_side(a) == TAB_BAR_TOP) + draw_tab_strip(a, s); + else + draw_tab_sidebar(a, s); + } /* Compact's shared lines go down first, so every pane's title and buttons * land on top of them; the hover hints come after the panes, because each * hint cell asks the finished hit list whether the boundary still owns it. */ |
