diff --git a/src/winio.c b/src/winio.c index 81e4f97da9844dd0bca80a0b88392cd5987f6300..3ac0a9e7c82ff1b9148b76e51e4b0c3f6cfacef2 100644 --- a/src/winio.c +++ b/src/winio.c @@ -347,19 +347,14 @@ int parse_kbinput(WINDOW *win) while (kbinput == NULL) kbinput = get_input(win, 1); - switch (*kbinput) { - case ERR: - break; - case NANO_CONTROL_3: + if (*kbinput == NANO_CONTROL_3) { /* Increment the escape counter. */ escapes++; /* If there are four consecutive escapes, discard three of them. */ if (escapes > 3) escapes = 1; solitary = (escapes == 1 && get_key_buffer_len() == 0); - /* Wait for more input. */ - break; - default: + } else if (*kbinput != ERR) { switch (escapes) { case 0: /* One non-escape: normal input mode. */