From e6abe55134df1b9dc3b7dd7f3a65dff272a35bb7 Mon Sep 17 00:00:00 2001 From: nicm Date: Mon, 12 Apr 2021 09:36:12 +0000 Subject: Add a flag to disable keys to close a message, GitHub issue 2625. --- status.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'status.c') diff --git a/status.c b/status.c index 154d9452..f9786f4b 100644 --- a/status.c +++ b/status.c @@ -424,7 +424,7 @@ status_redraw(struct client *c) /* Set a status line message. */ void status_message_set(struct client *c, int delay, int ignore_styles, - const char *fmt, ...) + int ignore_keys, const char *fmt, ...) { struct timeval tv; va_list ap; @@ -433,7 +433,6 @@ status_message_set(struct client *c, int delay, int ignore_styles, status_push_screen(c); va_start(ap, fmt); - c->message_ignore_styles = ignore_styles; xvasprintf(&c->message_string, fmt, ap); va_end(ap); @@ -456,6 +455,10 @@ status_message_set(struct client *c, int delay, int ignore_styles, evtimer_add(&c->message_timer, &tv); } + if (delay != 0) + c->message_ignore_keys = ignore_keys; + c->message_ignore_styles = ignore_styles; + c->tty.flags |= (TTY_NOCURSOR|TTY_FREEZE); c->flags |= CLIENT_REDRAWSTATUS; } -- cgit