summaryrefslogtreecommitdiff
path: root/src/os_unix.c
diff options
context:
space:
mode:
authorBram Moolenaar <Bram@vim.org>2019-08-30 19:28:25 +0200
committerBram Moolenaar <Bram@vim.org>2019-08-30 19:28:25 +0200
commitb5432d8968bda70fc20ebb5e136e367d174d1c4e (patch)
tree9185bde49137fd6cdebe56b43c53925b178d912f /src/os_unix.c
parent60b1bcfe92da1d7b8f894c91192f3a76e8aec391 (diff)
downloadvim-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)
Diffstat (limited to 'src/os_unix.c')
-rw-r--r--src/os_unix.c3
1 files changed, 2 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;