From 2d0845860a7d083f63062ca4f3f54bd52e07d79d Mon Sep 17 00:00:00 2001 From: nicm Date: Thu, 25 Jun 2026 17:17:25 +0000 Subject: [PATCH] Fix scrollbar with a format colour. --- style.c | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/style.c b/style.c index 60ac4dd6e..f386b83eb 100644 --- a/style.c +++ b/style.c @@ -480,18 +480,25 @@ style_set_scrollbar_style_from_option(struct style *sb_style, const struct options_table_entry *oe; struct options_entry *o; const char *s; + char *style, *expanded; style_set(sb_style, &grid_default_cell); o = options_get(oo, "pane-scrollbars-style"); if (o == NULL) fatalx("missing pane-scrollbars-style"); oe = options_table_entry(o); - if (style_parse(sb_style, &grid_default_cell, oe->default_str) != 0) + style = format_single(NULL, oe->default_str, NULL, NULL, NULL, NULL); + if (style_parse(sb_style, &grid_default_cell, style) != 0) fatalx("bad pane-scrollbars-style default"); s = options_get_string(oo, "pane-scrollbars-style"); - if (s != NULL && style_parse(sb_style, &grid_default_cell, s) != 0) - style_parse(sb_style, &grid_default_cell, oe->default_str); + if (s != NULL) { + expanded = format_single(NULL, s, NULL, NULL, NULL, NULL); + if (style_parse(sb_style, &grid_default_cell, expanded) != 0) + style_parse(sb_style, &grid_default_cell, style); + free(expanded); + } + free(style); if (sb_style->width < 1) sb_style->width = PANE_SCROLLBARS_DEFAULT_WIDTH; if (sb_style->pad < 0)