aboutsummaryrefslogtreecommitdiff
path: root/popup.c
diff options
context:
space:
mode:
Diffstat (limited to 'popup.c')
-rw-r--r--popup.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/popup.c b/popup.c
index f4afbd85..f2b9bd11 100644
--- a/popup.c
+++ b/popup.c
@@ -260,7 +260,8 @@ popup_key_cb(struct client *c, struct key_event *event)
if (pd->ictx != NULL && (pd->flags & POPUP_WRITEKEYS)) {
if (KEYC_IS_MOUSE(event->key))
return (0);
- if ((~pd->flags & POPUP_CLOSEEXIT) &&
+ if (((pd->flags & (POPUP_CLOSEEXIT|POPUP_CLOSEEXITZERO)) == 0 ||
+ pd->job == NULL) &&
(event->key == '\033' || event->key == '\003'))
return (1);
if (pd->job == NULL)
@@ -347,6 +348,8 @@ popup_job_complete_cb(struct job *job)
if (pd->flags & POPUP_CLOSEEXIT)
server_client_clear_overlay(pd->c);
+ if ((pd->flags & POPUP_CLOSEEXITZERO) && pd->status == 0)
+ server_client_clear_overlay(pd->c);
}
u_int