]> granicus.if.org Git - vim/commitdiff
patch 8.1.1948: mouse doesn't work in Linux console v8.1.1948
authorBram Moolenaar <Bram@vim.org>
Fri, 30 Aug 2019 17:28:25 +0000 (19:28 +0200)
committerBram Moolenaar <Bram@vim.org>
Fri, 30 Aug 2019 17:28:25 +0000 (19:28 +0200)
Problem:    Mouse doesn't work in Linux console and causes 100% CPU. (James P.
            Harvey)
Solution:   Loop in WaitForCharOrMouse() when gpm_process_wanted is set.
            (closes #4828)

src/os_unix.c
src/version.c

index d80fb1db034c1deb89a905e47b233b34fca2c53e..437b37ab055cac17489525768e26a8ef2e0d2112 100644 (file)
@@ -6007,10 +6007,11 @@ WaitForCharOrMouse(long msec, int *interrupted, int ignore_input)
        gpm_process_wanted = 0;
        avail = RealWaitForChar(read_cmd_fd, msec,
                                             &gpm_process_wanted, interrupted);
+       if (!avail && !gpm_process_wanted)
 # else
        avail = RealWaitForChar(read_cmd_fd, msec, NULL, interrupted);
-# endif
        if (!avail)
+# endif
        {
            if (!ignore_input && input_available())
                return 1;
index 463d215d0828dc75469f663982cf44d960f4c084..f9e0f7b5f0c285fedc18e34b1712c2f53f17e7a8 100644 (file)
@@ -761,6 +761,8 @@ static char *(features[]) =
 
 static int included_patches[] =
 {   /* Add new patch number below this line */
+/**/
+    1948,
 /**/
     1947,
 /**/