patch 7.4.1404
Problem:    ch_read() doesn't time out on MS-Windows.
Solution:   Instead of WM_NETBEANS use select(). (Yukihiro Nakadaira)
diff --git a/src/gui_w32.c b/src/gui_w32.c
index 3a64691..edfe24e 100644
--- a/src/gui_w32.c
+++ b/src/gui_w32.c
@@ -1927,24 +1927,6 @@
     }
 #endif
 
-#ifdef FEAT_CHANNEL
-    if (msg.message == WM_NETBEANS)
-    {
-	int	    part;
-	channel_T   *channel = channel_fd2channel((sock_T)msg.wParam, &part);
-
-	if (channel != NULL)
-	{
-	    /* Disable error messages, they can mess up the display and throw
-	     * an exception. */
-	    ++emsg_off;
-	    channel_read(channel, part, "process_message");
-	    --emsg_off;
-	}
-	return;
-    }
-#endif
-
 #ifdef FEAT_SNIFF
     if (sniff_request_waiting && want_sniff_request)
     {
@@ -2245,7 +2227,18 @@
 	}
 
 #ifdef MESSAGE_QUEUE
-	parse_queued_messages();
+	/* Check channel while waiting message. */
+	for (;;)
+	{
+	    MSG msg;
+
+	    parse_queued_messages();
+
+	    if (pPeekMessage(&msg, NULL, 0, 0, PM_NOREMOVE)
+		|| MsgWaitForMultipleObjects(0, NULL, FALSE, 100, QS_ALLEVENTS)
+								!= WAIT_TIMEOUT)
+		break;
+	}
 #endif
 
 	/*