diff options
author | nicm <nicm> | 2021-04-12 09:36:12 +0000 |
---|---|---|
committer | nicm <nicm> | 2021-04-12 09:36:12 +0000 |
commit | e6abe55134df1b9dc3b7dd7f3a65dff272a35bb7 (patch) | |
tree | 6c99cf6da3a6d22ecbb9b69dfc7696e5fb31c796 /status.c | |
parent | cd208c9d72df79a34024df6b8eb8f984613de8ef (diff) | |
download | rtmux-e6abe55134df1b9dc3b7dd7f3a65dff272a35bb7.tar.gz rtmux-e6abe55134df1b9dc3b7dd7f3a65dff272a35bb7.tar.bz2 rtmux-e6abe55134df1b9dc3b7dd7f3a65dff272a35bb7.zip |
Add a flag to disable keys to close a message, GitHub issue 2625.
Diffstat (limited to 'status.c')
-rw-r--r-- | status.c | 7 |
1 files changed, 5 insertions, 2 deletions
@@ -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; } |