]> granicus.if.org Git - vim/commitdiff
patch 8.2.2008: MS-Windows GUI: handling channel messages lags v8.2.2008
authorBram Moolenaar <Bram@vim.org>
Wed, 18 Nov 2020 14:21:50 +0000 (15:21 +0100)
committerBram Moolenaar <Bram@vim.org>
Wed, 18 Nov 2020 14:21:50 +0000 (15:21 +0100)
Problem:    MS-Windows GUI: handling channel messages lags.
Solution:   Reduce the wait time from 100 to 10 msec. (closes #7097)

src/gui_w32.c
src/version.c

index b2968614405f013c69becf1a03cfe90f26295f70..80a70e25ce3cbb647e387d19a255e6509b516fe2 100644 (file)
@@ -2134,7 +2134,10 @@ gui_mch_wait_for_chars(int wtime)
                break;
            }
            else if (input_available()
-                   || MsgWaitForMultipleObjects(0, NULL, FALSE, 100,
+                   // TODO: The 10 msec is a compromise between laggy response
+                   // and consuming more CPU time.  Better would be to handle
+                   // channel messages when they arrive.
+                   || MsgWaitForMultipleObjects(0, NULL, FALSE, 10,
                                                  QS_ALLINPUT) != WAIT_TIMEOUT)
                break;
        }
@@ -8458,7 +8461,7 @@ make_tooltip(BalloonEval *beval, char *text, POINT pt)
     TOOLINFOW  *pti;
     int                ToolInfoSize;
 
-    if (multiline_balloon_available() == TRUE)
+    if (multiline_balloon_available())
        ToolInfoSize = sizeof(TOOLINFOW_NEW);
     else
        ToolInfoSize = sizeof(TOOLINFOW);
@@ -8481,7 +8484,7 @@ make_tooltip(BalloonEval *beval, char *text, POINT pt)
     pti->hinst = 0; // Don't use string resources
     pti->uId = ID_BEVAL_TOOLTIP;
 
-    if (multiline_balloon_available() == TRUE)
+    if (multiline_balloon_available())
     {
        RECT rect;
        TOOLINFOW_NEW *ptin = (TOOLINFOW_NEW *)pti;
index cc296f5d6968fa70a07fe24e61597114419a4e0e..a96756de07766d04024247de1a6b8a8c7c64c0b8 100644 (file)
@@ -750,6 +750,8 @@ static char *(features[]) =
 
 static int included_patches[] =
 {   /* Add new patch number below this line */
+/**/
+    2008,
 /**/
     2007,
 /**/