summaryrefslogtreecommitdiff
path: root/usr.bin/tmux/alerts.c
diff options
context:
space:
mode:
authorNicholas Marriott <nicm@cvs.openbsd.org>2021-04-12 09:36:13 +0000
committerNicholas Marriott <nicm@cvs.openbsd.org>2021-04-12 09:36:13 +0000
commit17aaf2b002210b87deb9de55be92e7a4591c4c9c (patch)
tree8c43795fb69314c1ef8b3a3f706e30d6197855f7 /usr.bin/tmux/alerts.c
parent9dae6b02295a75d863f5a8037238876f36fdfa81 (diff)
Add a flag to disable keys to close a message, GitHub issue 2625.
Diffstat (limited to 'usr.bin/tmux/alerts.c')
-rw-r--r--usr.bin/tmux/alerts.c11
1 files changed, 6 insertions, 5 deletions
diff --git a/usr.bin/tmux/alerts.c b/usr.bin/tmux/alerts.c
index 71fb3b88cea..c6d072fc693 100644
--- a/usr.bin/tmux/alerts.c
+++ b/usr.bin/tmux/alerts.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: alerts.c,v 1.32 2020/08/19 07:15:42 nicm Exp $ */
+/* $OpenBSD: alerts.c,v 1.33 2021/04/12 09:36:12 nicm Exp $ */
/*
* Copyright (c) 2015 Nicholas Marriott <nicholas.marriott@gmail.com>
@@ -315,10 +315,11 @@ alerts_set_message(struct winlink *wl, const char *type, const char *option)
tty_putcode(&c->tty, TTYC_BEL);
if (visual == VISUAL_OFF)
continue;
- if (c->session->curw == wl)
- status_message_set(c, -1, 1, "%s in current window", type);
- else {
- status_message_set(c, -1, 1, "%s in window %d", type,
+ if (c->session->curw == wl) {
+ status_message_set(c, -1, 1, 0, "%s in current window",
+ type);
+ } else {
+ status_message_set(c, -1, 1, 0, "%s in window %d", type,
wl->idx);
}
}