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. --- cmd-display-message.c | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) (limited to 'cmd-display-message.c') diff --git a/cmd-display-message.c b/cmd-display-message.c index 301c1a5e..0522d37f 100644 --- a/cmd-display-message.c +++ b/cmd-display-message.c @@ -39,8 +39,8 @@ const struct cmd_entry cmd_display_message_entry = { .name = "display-message", .alias = "display", - .args = { "acd:Ipt:F:v", 0, 1 }, - .usage = "[-aIpv] [-c target-client] [-d delay] [-F format] " + .args = { "acd:INpt:F:v", 0, 1 }, + .usage = "[-aINpv] [-c target-client] [-d delay] [-F format] " CMD_TARGET_PANE_USAGE " [message]", .target = { 't', CMD_FIND_PANE, CMD_FIND_CANFAIL }, @@ -132,8 +132,10 @@ cmd_display_message_exec(struct cmd *self, struct cmdq_item *item) cmdq_error(item, "%s", msg); else if (args_has(args, 'p')) cmdq_print(item, "%s", msg); - else if (tc != NULL) - status_message_set(tc, delay, 0, "%s", msg); + else if (tc != NULL) { + status_message_set(tc, delay, 0, args_has(args, 'N'), "%s", + msg); + } free(msg); format_free(ft); -- cgit