diff --git a/src/search.c b/src/search.c index e86b20b8..5edeb022 100644 --- a/src/search.c +++ b/src/search.c @@ -219,7 +219,7 @@ int findnextstr(const char *needle, bool whole_word_only, int modus, lastkbcheck = time(NULL); /* Consume all waiting keystrokes until a Cancel. */ - while (input) { + while (input != ERR) { if (func_from_key(&input) == do_cancel) { statusbar(_("Cancelled")); enable_waiting(); diff --git a/src/winio.c b/src/winio.c index b1488d5b..7e338757 100644 --- a/src/winio.c +++ b/src/winio.c @@ -363,7 +363,7 @@ int parse_kbinput(WINDOW *win) kbinput = get_input(win, 1); if (kbinput == NULL && !waiting_mode) - return 0; + return ERR; while (kbinput == NULL) kbinput = get_input(win, 1);