summaryrefslogtreecommitdiffstats
path: root/src/gui_x11.c
diff options
context:
space:
mode:
authorBram Moolenaar <Bram@vim.org>2019-01-28 22:32:58 +0100
committerBram Moolenaar <Bram@vim.org>2019-01-28 22:32:58 +0100
commit12dfc9eef14fe74c46145aa9e6cba9666f1bcd40 (patch)
tree3a3c98030644028f710d33d7c2b2558ac0f2db13 /src/gui_x11.c
parentf58d81a18752cb9bf899b3f7328fc489cf6558e8 (diff)
patch 8.1.0840: getchar(0) never returns a character in the terminalv8.1.0840
Problem: getchar(0) never returns a character in the terminal. Solution: Call wait_func() at least once.
Diffstat (limited to 'src/gui_x11.c')
-rw-r--r--src/gui_x11.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/gui_x11.c b/src/gui_x11.c
index c8a3b773ab..ad91a21013 100644
--- a/src/gui_x11.c
+++ b/src/gui_x11.c
@@ -2683,9 +2683,10 @@ gui_mch_wait_for_chars(long wtime)
timed_out = FALSE;
- if (wtime > 0)
- timer = XtAppAddTimeOut(app_context, (long_u)wtime, gui_x11_timer_cb,
- &timed_out);
+ if (wtime >= 0)
+ timer = XtAppAddTimeOut(app_context,
+ (long_u)(wtime == 0 ? 1L : wtime),
+ gui_x11_timer_cb, &timed_out);
#ifdef FEAT_JOB_CHANNEL
/* If there is a channel with the keep_open flag we need to poll for input
* on them. */