From 12dfc9eef14fe74c46145aa9e6cba9666f1bcd40 Mon Sep 17 00:00:00 2001 From: Bram Moolenaar Date: Mon, 28 Jan 2019 22:32:58 +0100 Subject: patch 8.1.0840: getchar(0) never returns a character in the terminal Problem: getchar(0) never returns a character in the terminal. Solution: Call wait_func() at least once. --- src/gui_photon.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'src/gui_photon.c') diff --git a/src/gui_photon.c b/src/gui_photon.c index 234d25066..94012287e 100644 --- a/src/gui_photon.c +++ b/src/gui_photon.c @@ -1344,8 +1344,9 @@ gui_mch_wait_for_chars(int wtime) { is_timeout = FALSE; - if (wtime > 0) - PtSetResource(gui_ph_timer_timeout, Pt_ARG_TIMER_INITIAL, wtime, 0); + if (wtime >= 0) + PtSetResource(gui_ph_timer_timeout, Pt_ARG_TIMER_INITIAL, + wtime == 0 ? 1 : wtime, 0); while (1) { -- cgit v1.2.1