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

@@ -2665,6 +2665,14 @@ try_again:
forward_key:
if (c->flags & CLIENT_READONLY)
goto out;
if (wp != NULL &&
options_get_number(wp->options, "remain-on-exit") == 3 &&
(wp->flags & PANE_EXITED) &&
!KEYC_IS_MOUSE(key) && !KEYC_IS_PASTE(key)) {
options_set_number(wp->options, "remain-on-exit", 0);
server_destroy_pane(wp, 0);
goto out;
}
if (wp != NULL)
window_pane_key(wp, c, s, wl, key, m);
goto out;