Add formats to show if pane is the marked pane and if any marked pane is set.

This commit is contained in:
nicm 2019-05-09 08:38:13 +00:00
parent f9682d2e55
commit 299b7289ea
2 changed files with 8 additions and 0 deletions

View File

@ -2036,6 +2036,12 @@ format_defaults_pane(struct format_tree *ft, struct window_pane *wp)
else
format_add(ft, "pane_dead", "0");
if (server_check_marked() && marked_pane.wp == wp)
format_add(ft, "pane_marked", "1");
else
format_add(ft, "pane_marked", "0");
format_add(ft, "pane_marked_set", "%d", server_check_marked());
format_add(ft, "pane_left", "%u", wp->xoff);
format_add(ft, "pane_top", "%u", wp->yoff);
format_add(ft, "pane_right", "%u", wp->xoff + wp->sx - 1);

2
tmux.1
View File

@ -3969,6 +3969,8 @@ The following variables are available, where appropriate:
.It Li "pane_input_off" Ta "" Ta "If input to pane is disabled"
.It Li "pane_index" Ta "#P" Ta "Index of pane"
.It Li "pane_left" Ta "" Ta "Left of pane"
.It Li "pane_marked" Ta " Ta "1 if this is the marked pane"
.It Li "pane_marked_set" Ta " Ta "1 if a market pane is set"
.It Li "pane_mode" Ta "" Ta "Name of pane mode, if any."
.It Li "pane_pid" Ta "" Ta "PID of first process in pane"
.It Li "pane_pipe" Ta "" Ta "1 if pane is being piped"