search: use a better value to mean "nothing was typed"

When the keyboard buffer is empty, return a value that is not equivalent
to <Ctrl+Space>, so that typing a bunch of these while searching is going
on will not result in some of them getting executed afterward.
master
Benno Schulenberg 2018-04-13 20:02:28 +02:00
parent 02d8da3bdd
commit d4304ca88c
2 changed files with 2 additions and 2 deletions

View File

@ -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();

View File

@ -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);