Allow the indicator in tree mode to be customized by two new options:

tree-mode-preview-format and tree-mode-preview-style.
This commit is contained in:
nicm
2026-05-03 15:02:48 +00:00
parent 637d4c3083
commit d52fabce72
3 changed files with 108 additions and 61 deletions

View File

@@ -1488,6 +1488,28 @@ const struct options_table_entry options_table[] = {
"A value of 0 means no limit."
},
{ .name = "tree-mode-preview-format",
.type = OPTIONS_TABLE_STRING,
.scope = OPTIONS_TABLE_WINDOW|OPTIONS_TABLE_PANE,
.default_str = "#{?pane_format,"
"#{pane_index}:#{pane_title},"
"#{window_index}:#{window_name}}",
.text = "Format of the preview indicator in tree mode."
},
{ .name = "tree-mode-preview-style",
.type = OPTIONS_TABLE_STRING,
.scope = OPTIONS_TABLE_WINDOW,
.default_str = "fg=#{?#{||:"
"#{&&:#{pane_format},#{pane_active}},"
"#{&&:#{window_format},#{window_active}}},"
"#{display-panes-active-colour},"
"#{display-panes-colour}}",
.flags = OPTIONS_TABLE_IS_STYLE,
.separator = ",",
.text = "Style of preview indicator in tree mode."
},
{ .name = "window-active-style",
.type = OPTIONS_TABLE_STRING,
.scope = OPTIONS_TABLE_WINDOW|OPTIONS_TABLE_PANE,