aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--format.c7
-rw-r--r--tmux.16
2 files changed, 12 insertions, 1 deletions
diff --git a/format.c b/format.c
index 10e5e0a8..e10f08c9 100644
--- a/format.c
+++ b/format.c
@@ -552,6 +552,13 @@ format_window_pane(struct format_tree *ft, struct window_pane *wp)
format_add(ft, "pane_active", "%d", wp == wp->window->active);
format_add(ft, "pane_dead", "%d", wp->fd == -1);
+ if (window_pane_visible(wp)) {
+ 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);
+ format_add(ft, "pane_bottom", "%u", wp->yoff + wp->sy - 1);
+ }
+
format_add(ft, "pane_in_mode", "%d", wp->screen != &wp->base);
format_add(ft, "pane_synchronized", "%d",
!!options_get_number(&wp->window->options, "synchronize-panes"));
diff --git a/tmux.1 b/tmux.1
index 4aa66f9c..9a5a1c4d 100644
--- a/tmux.1
+++ b/tmux.1
@@ -3075,17 +3075,21 @@ The following variables are available, where appropriate:
.It Li "mouse_standard_flag" Ta "" Ta "Pane mouse standard flag"
.It Li "mouse_utf8_flag" Ta "" Ta "Pane mouse UTF-8 flag"
.It Li "pane_active" Ta "" Ta "1 if active pane"
+.It Li "pane_bottom" Ta "" Ta "Bottom of pane"
.It Li "pane_current_command" Ta "" Ta "Current command if available"
.It Li "pane_dead" Ta "" Ta "1 if pane is dead"
.It Li "pane_height" Ta "" Ta "Height of pane"
.It Li "pane_id" Ta "#D" Ta "Unique pane ID"
.It Li "pane_in_mode" Ta "" Ta "If pane is in a mode"
-.It Li "pane_synchronized" Ta "" Ta "If pane is synchronized"
.It Li "pane_index" Ta "#P" Ta "Index of pane"
+.It Li "pane_left" Ta "" Ta "Left of pane"
.It Li "pane_pid" Ta "" Ta "PID of first process in pane"
+.It Li "pane_right" Ta "" Ta "Right of pane"
.It Li "pane_start_command" Ta "" Ta "Command pane started with"
+.It Li "pane_synchronized" Ta "" Ta "If pane is synchronized"
.It Li "pane_tabs" Ta "" Ta "Pane tab positions"
.It Li "pane_title" Ta "#T" Ta "Title of pane"
+.It Li "pane_top" Ta "" Ta "Top of pane"
.It Li "pane_tty" Ta "" Ta "Pseudo terminal of pane"
.It Li "pane_width" Ta "" Ta "Width of pane"
.It Li "saved_cursor_x" Ta "" Ta "Saved cursor X in pane"