From 4869a5165ad3d339c71512756120e09480959598 Mon Sep 17 00:00:00 2001 From: nicm Date: Fri, 26 Jun 2026 12:06:17 +0000 Subject: [PATCH] Add tree-mode-selection-style to continue the process of moving away from mode-style. --- mode-tree.c | 2 +- options-table.c | 9 +++++++++ tmux.1 | 8 ++++++++ 3 files changed, 18 insertions(+), 1 deletion(-) diff --git a/mode-tree.c b/mode-tree.c index 06001a672..afa04bd0f 100644 --- a/mode-tree.c +++ b/mode-tree.c @@ -839,7 +839,7 @@ mode_tree_draw(struct mode_tree_data *mtd) memcpy(&gc0, &grid_default_cell, sizeof gc0); memcpy(&gc, &grid_default_cell, sizeof gc); - style_apply(&gc, oo, "mode-style", NULL); + style_apply(&gc, oo, "tree-mode-selection-style", NULL); memcpy(&box_gc, &grid_default_cell, sizeof box_gc); style_apply(&box_gc, oo, "tree-mode-border-style", NULL); diff --git a/options-table.c b/options-table.c index b9ae14970..e07b61fbb 100644 --- a/options-table.c +++ b/options-table.c @@ -1719,6 +1719,15 @@ const struct options_table_entry options_table[] = { .text = "Style of preview indicator in tree mode." }, + { .name = "tree-mode-selection-style", + .type = OPTIONS_TABLE_STRING, + .scope = OPTIONS_TABLE_WINDOW, + .default_str = "#{E:mode-style}", + .flags = OPTIONS_TABLE_IS_STYLE, + .separator = ",", + .text = "Style of the selected line in tree mode." + }, + { .name = "window-active-style", .type = OPTIONS_TABLE_STRING, .scope = OPTIONS_TABLE_WINDOW|OPTIONS_TABLE_PANE, diff --git a/tmux.1 b/tmux.1 index 25ed0f221..3df69e546 100644 --- a/tmux.1 +++ b/tmux.1 @@ -5913,6 +5913,14 @@ see the .Sx STYLES section. .Pp +.It Ic tree\-mode\-selection\-style Ar style +Set the style of the selected line in tree mode. +For how to specify +.Ar style , +see the +.Sx STYLES +section. +.Pp .It Ic window\-status\-activity\-style Ar style Set status line style for windows with an activity alert. For how to specify