nano

nano with my custom patches
git clone git://bsandro.tech/nano
Log | Files | Refs | README | LICENSE

commit a101b30fa81f91868db614ff10ea466da8292336
parent 0bffd99dcbcf653f3394cae36ccda096aa583cdc
Author: Benno Schulenberg <bensberg@justemail.net>
Date:   Sat, 16 Apr 2016 11:57:05 +0200

keyboard: reshuffle some lines to avoid an empty while

Diffstat:
Msrc/winio.c | 12++++++------
1 file changed, 6 insertions(+), 6 deletions(-)

diff --git a/src/winio.c b/src/winio.c @@ -337,13 +337,13 @@ int parse_kbinput(WINDOW *win) func_key = FALSE; /* Read in a character. */ - if (nodelay_mode) { + kbinput = get_input(win, 1); + + if (kbinput == NULL && nodelay_mode) + return 0; + + while (kbinput == NULL) kbinput = get_input(win, 1); - if (kbinput == 0) - return 0; - } else - while ((kbinput = get_input(win, 1)) == NULL) - ; switch (*kbinput) { case ERR: