diff --git a/src/channel.c b/src/channel.c index 4607b1e605..442c33a507 100644 --- a/src/channel.c +++ b/src/channel.c @@ -4299,6 +4299,10 @@ channel_read(channel_T *channel, ch_part_T part, char *func) newchannel->CH_SOCK_FD = (sock_T)newfd; newchannel->ch_to_be_closed |= (1U << PART_SOCK); +#ifdef FEAT_GUI + channel_gui_register_one(newchannel, PART_SOCK); +#endif + if (client.ss_family == AF_INET) { #ifdef HAVE_INET_NTOP diff --git a/src/testdir/test_channel.vim b/src/testdir/test_channel.vim index 203ae0428e..6cd55ca9f9 100644 --- a/src/testdir/test_channel.vim +++ b/src/testdir/test_channel.vim @@ -2763,10 +2763,17 @@ endfunc let g:server_received_addr = '' let g:server_received_msg = '' +let g:server_received_input = '' + +func s:test_listen_input(ch, msg) + let g:server_received_input = a:msg +endfunc func s:test_listen_accept(ch, addr) let g:server_received_addr = a:addr let g:server_received_msg = ch_readraw(a:ch) + + call ch_setoptions(a:ch, #{mode: "raw", callback: function('s:test_listen_input')}) endfunction func Test_listen() @@ -2782,7 +2789,10 @@ func Test_listen() return endif call ch_sendraw(handle, 'hello') - call WaitFor('"" != g:server_received_msg') + call WaitFor('"hello" == g:server_received_msg') + call ch_sendraw(handle, 'notify') + call WaitFor('"notify" == g:server_received_input') + call ch_close(handle) call ch_close(server) call assert_equal('hello', g:server_received_msg) diff --git a/src/version.c b/src/version.c index 6dc2b537b7..4387901241 100644 --- a/src/version.c +++ b/src/version.c @@ -734,6 +734,8 @@ static char *(features[]) = static int included_patches[] = { /* Add new patch number below this line */ +/**/ + 313, /**/ 312, /**/