Add a couple of controls (kill, zoom) to default pane-status-format.

Will be more to come with floating panes. From Dane Jensen in GitHub
issue 4981.
This commit is contained in:
nicm
2026-04-22 07:13:26 +00:00
parent d339ab51eb
commit d36f6783c7
2 changed files with 12 additions and 1 deletions

View File

@@ -467,6 +467,10 @@ key_bindings_init(void)
"bind -n MouseDown1Status { switch-client -t= }",
"bind -n C-MouseDown1Status { swap-window -t@ }",
/* Mouse button 1 down on default pane-border-format */
"bind -n MouseDown1Control9 { display-menu -t= -xM -yM -O -T 'Kill pane #{pane_index}?' 'Yes' 'y' { kill-pane -t= } 'No' 'n' {}}",
"bind -n MouseDown1Control8 { resize-pane -Z }",
/* Mouse wheel down on status line. */
"bind -n WheelDownStatus { next-window }",

View File

@@ -1305,7 +1305,14 @@ const struct options_table_entry options_table[] = {
.type = OPTIONS_TABLE_STRING,
.scope = OPTIONS_TABLE_WINDOW|OPTIONS_TABLE_PANE,
.default_str = "#{?pane_active,#[reverse],}#{pane_index}#[default] "
"\"#{pane_title}\"",
"\"#{pane_title}\""
"#{?#{mouse},"
"#[align=right]"
"#[range=control|8]["
"#{?#{window_zoomed_flag},u,z}"
"]#[norange]"
"#[range=control|9][x]#[norange]"
",}",
.text = "Format of text in the pane status lines."
},