tweaks: remove an unneeded beep, and reshuffle the lines for compactness

The beep is produced later, after get_verbatim_kbinput() returns.
This commit is contained in:
Benno Schulenberg 2020-08-10 11:55:56 +02:00
parent 1551c1c771
commit 9875252fd7
1 changed files with 3 additions and 5 deletions

View File

@ -1460,13 +1460,11 @@ char *get_verbatim_kbinput(WINDOW *win, size_t *count)
/* If the byte is invalid in the current mode, discard it;
* if it is an incomplete Unicode sequence, stuff it back. */
if (input != NULL) {
if ((*input == '\n' && as_an_at) || (*input == '\0' && !as_an_at)) {
*count = 0;
beep();
} else if (*input >= 0x80 && *count == 1) {
if (*input >= 0x80 && *count == 1) {
put_back(*input);
*count = 999;
}
} else if ((*input == '\n' && as_an_at) || (*input == '\0' && !as_an_at))
*count = 0;
}
#ifndef NANO_TINY