diff options
author | Bram Moolenaar <Bram@vim.org> | 2019-08-30 19:28:25 +0200 |
---|---|---|
committer | Bram Moolenaar <Bram@vim.org> | 2019-08-30 19:28:25 +0200 |
commit | b5432d8968bda70fc20ebb5e136e367d174d1c4e (patch) | |
tree | 9185bde49137fd6cdebe56b43c53925b178d912f | |
parent | 60b1bcfe92da1d7b8f894c91192f3a76e8aec391 (diff) | |
download | vim-git-b5432d8968bda70fc20ebb5e136e367d174d1c4e.tar.gz |
patch 8.1.1948: mouse doesn't work in Linux consolev8.1.1948
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)
-rw-r--r-- | src/os_unix.c | 3 | ||||
-rw-r--r-- | src/version.c | 2 |
2 files changed, 4 insertions, 1 deletions
diff --git a/src/os_unix.c b/src/os_unix.c index d80fb1db0..437b37ab0 100644 --- a/src/os_unix.c +++ b/src/os_unix.c @@ -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; diff --git a/src/version.c b/src/version.c index 463d215d0..f9e0f7b5f 100644 --- a/src/version.c +++ b/src/version.c @@ -762,6 +762,8 @@ static char *(features[]) = static int included_patches[] = { /* Add new patch number below this line */ /**/ + 1948, +/**/ 1947, /**/ 1946, |