diff options
author | Thomas Adam <thomas@xteddy.org> | 2014-12-19 19:20:09 +0000 |
---|---|---|
committer | Thomas Adam <thomas@xteddy.org> | 2014-12-19 19:22:19 +0000 |
commit | 5f8138faf551c3678de3c92c5764e2e7edfc4602 (patch) | |
tree | 6646056b5b2bab330ec6ec62400004548dc0aa18 /format.c | |
parent | ccbe2545d9857e03731eddb9757989b9f52dc785 (diff) | |
parent | 160e3e2be3543377925551146403933a7c631f51 (diff) | |
download | rtmux-5f8138faf551c3678de3c92c5764e2e7edfc4602.tar.gz rtmux-5f8138faf551c3678de3c92c5764e2e7edfc4602.tar.bz2 rtmux-5f8138faf551c3678de3c92c5764e2e7edfc4602.zip |
Merge branch 'obsd-master'
Conflicts:
format.c
Diffstat (limited to 'format.c')
-rw-r--r-- | format.c | 8 |
1 files changed, 7 insertions, 1 deletions
@@ -18,6 +18,7 @@ #include <sys/types.h> #include <sys/param.h> +#include <sys/wait.h> #include <ctype.h> #include <errno.h> @@ -582,6 +583,7 @@ format_window_pane(struct format_tree *ft, struct window_pane *wp) unsigned long long size; u_int i, idx; char *cmd, *cwd; + int status; if (ft->w == NULL) ft->w = wp->window; @@ -605,9 +607,13 @@ format_window_pane(struct format_tree *ft, struct window_pane *wp) format_add(ft, "pane_title", "%s", wp->base.title); format_add(ft, "pane_id", "%%%u", wp->id); format_add(ft, "pane_active", "%d", wp == wp->window->active); - format_add(ft, "pane_dead", "%d", wp->fd == -1); format_add(ft, "pane_input_off", "%d", !!(wp->flags & PANE_INPUTOFF)); + status = wp->status; + if (wp->fd == -1 && WIFEXITED(status)) + format_add(ft, "pane_dead_status", "%d", WEXITSTATUS(status)); + 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); |