Skip to content

Commit 4b08a13

Browse files
authored
Merge pull request #651 from ichizok/fix/gui-channel
Don't associate a single fd with both channel out and err
2 parents bdc1c5a + 14b995a commit 4b08a13

1 file changed

Lines changed: 10 additions & 3 deletions

File tree

src/channel.c

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1028,11 +1028,18 @@ channel_set_pipes(channel_T *channel, sock_T in, sock_T out, sock_T err)
10281028
channel_gui_unregister_one(channel, PART_ERR);
10291029
# endif
10301030
ch_close_part(channel, PART_ERR);
1031-
channel->CH_ERR_FD = err;
1032-
channel->ch_to_be_closed |= (1 << PART_ERR);
1031+
# if defined(FEAT_GUI_MACVIM)
1032+
if (err == out && gui.in_use)
1033+
channel->CH_ERR_FD = INVALID_FD;
1034+
else
1035+
# endif
1036+
{
1037+
channel->CH_ERR_FD = err;
1038+
channel->ch_to_be_closed |= (1 << PART_ERR);
10331039
# if defined(FEAT_GUI)
1034-
channel_gui_register_one(channel, PART_ERR);
1040+
channel_gui_register_one(channel, PART_ERR);
10351041
# endif
1042+
}
10361043
}
10371044
}
10381045

0 commit comments

Comments
 (0)