aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authoruser <user@clank>2026-09-22 15:24:16 +0200
committeruser <user@clank>2026-09-22 15:24:16 +0200
commitecdc8d0c335c35a74b46ddb22773e8ef4b222891 (patch)
treec2595e7522364eaaacd58f6c3a45a238b9e9fafa /src
parentosc 5577: `busy`, and a sidebar that shows it (busy_mark) (diff)
downloadslosh-ecdc8d0c335c35a74b46ddb22773e8ef4b222891.tar.gz
slosh-ecdc8d0c335c35a74b46ddb22773e8ef4b222891.tar.xz
slosh-ecdc8d0c335c35a74b46ddb22773e8ef4b222891.zip
sidebar: room for the spinner, by default (tab_bar_padding 0 1 0 2)
`│⠋bash: cd` -- the mark landed in the one column of left padding there was, so it ended up welded to the first letter of the status. The rule was "the mark takes a column the padding was already holding blank", which is right about not reflowing and wrong about there being enough of it. So the mark takes the *first* column of the indent and whatever is left over is the air after it, and the default indent is two columns instead of one. One column is still available -- `tab_bar_padding 0 1` -- and now means the squashed look on purpose rather than by default; three gives two spaces; zero still puts everything against the frame. Nothing reflows when a program starts or stops working, which was the point of taking a column that was already blank. The labels and the tab numbers move with it, because the indent is the strip's and not the status's -- a status still starts in the column its tab's name starts in, which is the rule the leading space existed for in the first place.
Diffstat (limited to 'src')
-rw-r--r--src/app_draw.c18
-rw-r--r--src/config.c12
2 files changed, 19 insertions, 11 deletions
diff --git a/src/app_draw.c b/src/app_draw.c
index 8c70771..5676240 100644
--- a/src/app_draw.c
+++ b/src/app_draw.c
@@ -2459,14 +2459,18 @@ void draw_tab_sidebar(app_t *a, screen_t *s) {
: busy ? TAB_STATUS_BUSY
: TAB_STATUS_FG,
band, hot ? ATTR_BOLD : ATTR_ITALIC);
- /* In the indent, against the text rather than against the frame, and
- * on the first row only: the mark belongs to the status, not to each
- * line it wrapped onto. It takes a column the padding was holding
- * blank, so nothing moves when a program starts or stops working --
- * a list that reflowed on every `make` would be worse than no mark. */
+ /* The first column of the indent, on the first row only: the mark
+ * belongs to the status, not to each line it wrapped onto. It takes a
+ * column the padding was holding blank, so nothing moves when a
+ * program starts or stops working -- a list that reflowed on every
+ * `make` would be worse than no mark -- and whatever padding is left
+ * after it is the air between the mark and the words. At
+ * `tab_bar_padding`'s default of two columns that is one space; at
+ * one column they stand shoulder to shoulder, which is the squashed
+ * look and now something you ask for rather than something you get. */
if (marked && k == 0)
- screen_text(s, (uint16_t)(cx + CFG.tab_pad_left - 1), y, spin,
- hot ? TAB_HOVER : TAB_STATUS_BUSY, band, 0);
+ screen_text(s, cx, y, spin, hot ? TAB_HOVER : TAB_STATUS_BUSY, band,
+ 0);
char act[24];
snprintf(act, sizeof act, "find:%u", ts.row[j].pane);
hit_add(&s->hits, cx, y, cw, 1, act);
diff --git a/src/config.c b/src/config.c
index 44aee5b..012964e 100644
--- a/src/config.c
+++ b/src/config.c
@@ -1002,11 +1002,15 @@ void config_defaults(config_t *c) {
* standing in for, and a blank row inside the frame on top of it reads as
* a gap nobody asked for. Still there for a bare sidebar, or for anyone
* who wants room at the top for a borderless window's own buttons. */
- /* No rows of air by default, and one column: that column is where every
- * label's leading space used to be hard-coded, so the default draws what it
- * always drew and 0 is now a thing you can ask for. */
+ /* No rows of air by default. One column on the right, which is where the
+ * tab number stops; two on the left, because the left indent is also the
+ * gutter a busy pane's spinner sits in -- one column would put the mark
+ * against the first letter of the status, which reads as clutter rather
+ * than as a mark. `tab_bar_padding 0 1` is the squashed look for anyone
+ * who wants the column back. */
c->tab_pad_top = c->tab_pad_bottom = 0;
- c->tab_pad_left = c->tab_pad_right = 1;
+ c->tab_pad_left = 2;
+ c->tab_pad_right = 1;
c->tab_gap = 0; /* flush, the way the list has always read */
/* Three is enough for "the build, the tests, and one more thing" without a
* chatty tab pushing the list off the bottom. */