From 95744963335389d670997fe943c0859449eddc3e Mon Sep 17 00:00:00 2001 From: nicm Date: Thu, 7 Oct 2021 07:52:13 +0000 Subject: Handle splitw -I correctly when used from an attached client, GitHub issue 2917. --- cmd-display-message.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'cmd-display-message.c') diff --git a/cmd-display-message.c b/cmd-display-message.c index 596f0b5c..7828f694 100644 --- a/cmd-display-message.c +++ b/cmd-display-message.c @@ -75,12 +75,16 @@ cmd_display_message_exec(struct cmd *self, struct cmdq_item *item) if (args_has(args, 'I')) { if (wp == NULL) return (CMD_RETURN_NORMAL); - if (window_pane_start_input(wp, item, &cause) != 0) { + switch (window_pane_start_input(wp, item, &cause)) { + case -1: cmdq_error(item, "%s", cause); free(cause); return (CMD_RETURN_ERROR); + case 1: + return (CMD_RETURN_NORMAL); + case 0: + return (CMD_RETURN_WAIT); } - return (CMD_RETURN_WAIT); } if (args_has(args, 'F') && count != 0) { -- cgit