diff options
author | nicm <nicm> | 2017-10-12 11:32:27 +0000 |
---|---|---|
committer | nicm <nicm> | 2017-10-12 11:32:27 +0000 |
commit | a5fd5782f87362b8ee31cd5c6975728e112db9ff (patch) | |
tree | 2dd2cd2c900ab37fb592ac3d883d1615ed93e534 /format.c | |
parent | eb9839fd32d51688fe1877776921d2d76f2642a2 (diff) | |
download | rtmux-a5fd5782f87362b8ee31cd5c6975728e112db9ff.tar.gz rtmux-a5fd5782f87362b8ee31cd5c6975728e112db9ff.tar.bz2 rtmux-a5fd5782f87362b8ee31cd5c6975728e112db9ff.zip |
Show exit status and time in the remain-on-exit pane text, mostly from
Timo Boettcher in GitHub issue 1103.
Diffstat (limited to 'format.c')
-rw-r--r-- | format.c | 11 |
1 files changed, 6 insertions, 5 deletions
@@ -1376,8 +1376,8 @@ void format_defaults_pane(struct format_tree *ft, struct window_pane *wp) { struct grid *gd = wp->base.grid; + int status = wp->status; u_int idx; - int status; if (ft->w == NULL) ft->w = wp->window; @@ -1399,8 +1399,7 @@ format_defaults_pane(struct format_tree *ft, struct window_pane *wp) format_add(ft, "pane_input_off", "%d", !!(wp->flags & PANE_INPUTOFF)); format_add(ft, "pane_pipe", "%d", wp->pipe_fd != -1); - status = wp->status; - if (wp->fd == -1 && WIFEXITED(status)) + if ((wp->flags & PANE_STATUSREADY) && WIFEXITED(status)) format_add(ft, "pane_dead_status", "%d", WEXITSTATUS(status)); format_add(ft, "pane_dead", "%d", wp->fd == -1); @@ -1411,8 +1410,10 @@ format_defaults_pane(struct format_tree *ft, struct window_pane *wp) format_add(ft, "pane_bottom", "%u", wp->yoff + wp->sy - 1); format_add(ft, "pane_at_left", "%d", wp->xoff == 0); format_add(ft, "pane_at_top", "%d", wp->yoff == 0); - format_add(ft, "pane_at_right", "%d", wp->xoff + wp->sx == wp->window->sx); - format_add(ft, "pane_at_bottom", "%d", wp->yoff + wp->sy == wp->window->sy); + format_add(ft, "pane_at_right", "%d", + wp->xoff + wp->sx == wp->window->sx); + format_add(ft, "pane_at_bottom", "%d", + wp->yoff + wp->sy == wp->window->sy); } format_add(ft, "pane_in_mode", "%d", wp->screen != &wp->base); |