summaryrefslogtreecommitdiffstats
path: root/cmd-display-message.c
diff options
context:
space:
mode:
authornicm <nicm>2021-10-07 07:52:13 +0000
committernicm <nicm>2021-10-07 07:52:13 +0000
commit95744963335389d670997fe943c0859449eddc3e (patch)
tree7b48185c6b43ab0113cfed7eb6a39e2c969e4218 /cmd-display-message.c
parent5359b766195528b9a0763c7f5e4ce5f2797a9b09 (diff)
Handle splitw -I correctly when used from an attached client, GitHub
issue 2917.
Diffstat (limited to 'cmd-display-message.c')
-rw-r--r--cmd-display-message.c8
1 files changed, 6 insertions, 2 deletions
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) {