patch 7.4.1315
Problem: Using a channel handle does not allow for freeing it when unused.
Solution: Add the Channel variable type.
diff --git a/src/gui_w48.c b/src/gui_w48.c
index fd65581..67274ee 100644
--- a/src/gui_w48.c
+++ b/src/gui_w48.c
@@ -1780,14 +1780,14 @@
#ifdef FEAT_CHANNEL
if (msg.message == WM_NETBEANS)
{
- int channel_idx = channel_fd2idx((sock_T)msg.wParam);
+ channel_T *channel = channel_fd2channel((sock_T)msg.wParam);
- if (channel_idx >= 0)
+ if (channel != NULL)
{
/* Disable error messages, they can mess up the display and throw
* an exception. */
++emsg_off;
- channel_read(channel_idx, FALSE, "process_message");
+ channel_read(channel, FALSE, "process_message");
--emsg_off;
}
return;