changeset 22922:5d8990ad211e v8.2.2008

patch 8.2.2008: MS-Windows GUI: handling channel messages lags Commit: https://github.com/vim/vim/commit/032f40afb88b24043f96655aa248267a4f54faa8 Author: Bram Moolenaar <Bram@vim.org> Date: Wed Nov 18 15:21:50 2020 +0100 patch 8.2.2008: MS-Windows GUI: handling channel messages lags Problem: MS-Windows GUI: handling channel messages lags. Solution: Reduce the wait time from 100 to 10 msec. (closes https://github.com/vim/vim/issues/7097)
author Bram Moolenaar <Bram@vim.org>
date Wed, 18 Nov 2020 15:30:04 +0100
parents 9852101f2c48
children 277aa4652a3c
files src/gui_w32.c src/version.c
diffstat 2 files changed, 8 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/src/gui_w32.c
+++ b/src/gui_w32.c
@@ -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 *t
     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 *t
     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;
--- a/src/version.c
+++ b/src/version.c
@@ -751,6 +751,8 @@ static char *(features[]) =
 static int included_patches[] =
 {   /* Add new patch number below this line */
 /**/
+    2008,
+/**/
     2007,
 /**/
     2006,