input: Fix ctrl+c handling in convert_input

This commit is contained in:
Thiago de Arruda
2014-10-22 09:58:17 -03:00
parent 5cd9b64742
commit cdfdfae322

View File

@@ -264,15 +264,15 @@ static void convert_input(void)
for (int i = (int)count - 1; i >= 0; i--) {
if (inbuf[i] == 3) {
got_int = true;
consume_count = (size_t)i;
break;
}
}
if (consume_count) {
if (got_int) {
// Remove everything typed before the CTRL-C
rbuffer_consumed(input_buffer, consume_count);
got_int = true;
}
}