Mercurial > vim
diff src/gui_photon.c @ 15665:31367ce5aac7 v8.1.0840
patch 8.1.0840: getchar(0) never returns a character in the terminal
commit https://github.com/vim/vim/commit/12dfc9eef14fe74c46145aa9e6cba9666f1bcd40
Author: Bram Moolenaar <Bram@vim.org>
Date: Mon Jan 28 22:32:58 2019 +0100
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.
author | Bram Moolenaar <Bram@vim.org> |
---|---|
date | Mon, 28 Jan 2019 22:45:05 +0100 |
parents | 1ec942f1b648 |
children | cd5c83115ec6 |
line wrap: on
line diff
--- 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) {