]> granicus.if.org Git - vim/commitdiff
patch 8.0.0925: MS-Windows GUI: channel I/O not handled right away v8.0.0925
authorBram Moolenaar <Bram@vim.org>
Sun, 13 Aug 2017 13:37:58 +0000 (15:37 +0200)
committerBram Moolenaar <Bram@vim.org>
Sun, 13 Aug 2017 13:37:58 +0000 (15:37 +0200)
Problem:    MS-Windows GUI: channel I/O not handled right away.
Solution:   Don't call process_message() unless a message is available.
            (Yasuhiro Matsumoto, closes #1969)

src/gui_w32.c
src/version.c

index 863975c7f451a9f46c07b79ea4a9e77d5f38cf24..e94379ba7ce239234160ec6e4a16314b4793b119 100644 (file)
@@ -2073,20 +2073,23 @@ gui_mch_wait_for_chars(int wtime)
        did_add_timer = FALSE;
 #endif
 #ifdef MESSAGE_QUEUE
-       /* Check channel while waiting message. */
+       /* Check channel I/O while waiting for a message. */
        for (;;)
        {
            MSG msg;
 
            parse_queued_messages();
 
-           if (pPeekMessage(&msg, NULL, 0, 0, PM_NOREMOVE)
-               || MsgWaitForMultipleObjects(0, NULL, FALSE, 100, QS_ALLINPUT)
-                                                               != WAIT_TIMEOUT)
+           if (pPeekMessage(&msg, NULL, 0, 0, PM_NOREMOVE))
+           {
+               process_message();
+               break;
+           }
+           else if (MsgWaitForMultipleObjects(0, NULL, FALSE, 100, QS_ALLINPUT)
+                                                              != WAIT_TIMEOUT)
                break;
        }
-#endif
-
+#else
        /*
         * Don't use gui_mch_update() because then we will spin-lock until a
         * char arrives, instead we use GetMessage() to hang until an
@@ -2094,6 +2097,7 @@ gui_mch_wait_for_chars(int wtime)
         * returning as soon as it contains a single char -- webb
         */
        process_message();
+#endif
 
        if (input_available())
        {
index ec75b712048b3d04339ffc655b38abf95180bb43..67e96e6152574eb7d2dd1067fa370f328e599c9b 100644 (file)
@@ -769,6 +769,8 @@ static char *(features[]) =
 
 static int included_patches[] =
 {   /* Add new patch number below this line */
+/**/
+    925,
 /**/
     924,
 /**/