mirror of
https://github.com/vim/vim.git
synced 2025-09-27 04:14:06 -04:00
patch 7.4.1187
Problem: MS-Windows channel code only supports one channel. Doesn't build without netbeans support. Solution: Get the channel index from the socket in the message. Closes #600.
This commit is contained in:
@@ -207,7 +207,6 @@ channel_gui_register(int idx)
|
||||
/*
|
||||
* Tell Windows we are interested in receiving message when there
|
||||
* is input on the editor connection socket.
|
||||
* TODO: change WM_NETBEANS to something related to the channel index.
|
||||
*/
|
||||
if (channel->ch_inputHandler == -1)
|
||||
channel->ch_inputHandler =
|
||||
@@ -648,6 +647,24 @@ channel_read(int idx)
|
||||
#endif
|
||||
}
|
||||
|
||||
# if defined(FEAT_GUI_W32) || defined(PROTO)
|
||||
/*
|
||||
* Lookup the channel index from the socket.
|
||||
* Returns -1 when the socket isn't found.
|
||||
*/
|
||||
int
|
||||
channel_socket2idx(sock_T fd)
|
||||
{
|
||||
int i;
|
||||
|
||||
if (fd >= 0)
|
||||
for (i = 0; i < channel_count; ++i)
|
||||
if (channels[i].ch_fd == fd)
|
||||
return i;
|
||||
return -1;
|
||||
}
|
||||
# endif
|
||||
|
||||
/*
|
||||
* Write "buf" (NUL terminated string) to channel "idx".
|
||||
* When "fun" is not NULL an error message might be given.
|
||||
|
Reference in New Issue
Block a user