Handle splitw -I correctly when used from an attached client, GitHub

issue 2917.
This commit is contained in:
nicm
2021-10-07 07:52:13 +00:00
parent 5359b76619
commit 9574496333
3 changed files with 27 additions and 13 deletions

View File

@ -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) {