Add options to new-pane: -k -m message to wait for key before closing a floating pane.

This commit is contained in:
Michael Grant
2026-03-24 14:23:58 +00:00
parent f201d246fd
commit 6a62d49720
4 changed files with 23 additions and 6 deletions

View File

@@ -339,8 +339,11 @@ server_destroy_pane(struct window_pane *wp, int notify)
switch (remain_on_exit) {
case 0:
break;
case 3: /* keypress — fall through to draw remain-on-exit-format message */
/* FALLTHROUGH */
case 2:
if (WIFEXITED(wp->status) && WEXITSTATUS(wp->status) == 0)
if (remain_on_exit == 2 &&
WIFEXITED(wp->status) && WEXITSTATUS(wp->status) == 0)
break;
/* FALLTHROUGH */
case 1: