Allow panes to be empty (no command), output can be piped to them with

split-window or display-message -I.
This commit is contained in:
nicm
2019-05-03 20:44:24 +00:00
parent e8e4f4ec3e
commit 9f75635596
10 changed files with 144 additions and 34 deletions

View File

@ -2031,7 +2031,10 @@ format_defaults_pane(struct format_tree *ft, struct window_pane *wp)
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);
if (~wp->flags & PANE_EMPTY)
format_add(ft, "pane_dead", "%d", wp->fd == -1);
else
format_add(ft, "pane_dead", "0");
format_add(ft, "pane_left", "%u", wp->xoff);
format_add(ft, "pane_top", "%u", wp->yoff);