aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/os/input.c
diff options
context:
space:
mode:
authorJustin M. Keyes <justinkz@gmail.com>2019-06-18 00:00:51 +0200
committerJustin M. Keyes <justinkz@gmail.com>2019-08-27 21:19:10 +0200
commit21f0f7bca5a13fe847478ef27dc26bced9b3f3d1 (patch)
tree72f91c7794869206527eaa9497671a79aab1d3d8 /src/nvim/os/input.c
parenta851090dec8600b38d54cd65264e4146ad02b1e0 (diff)
downloadrneovim-21f0f7bca5a13fe847478ef27dc26bced9b3f3d1.tar.gz
rneovim-21f0f7bca5a13fe847478ef27dc26bced9b3f3d1.tar.bz2
rneovim-21f0f7bca5a13fe847478ef27dc26bced9b3f3d1.zip
paste: WIP #4448
Diffstat (limited to 'src/nvim/os/input.c')
-rw-r--r--src/nvim/os/input.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/nvim/os/input.c b/src/nvim/os/input.c
index 95e9e8e414..83ac3dfa62 100644
--- a/src/nvim/os/input.c
+++ b/src/nvim/os/input.c
@@ -448,7 +448,7 @@ static void process_interrupts(void)
size_t consume_count = 0;
RBUFFER_EACH_REVERSE(input_buffer, c, i) {
- if ((uint8_t)c == 3) {
+ if ((uint8_t)c == Ctrl_C) {
got_int = true;
consume_count = i;
break;
@@ -456,7 +456,7 @@ static void process_interrupts(void)
}
if (got_int && consume_count) {
- // Remove everything typed before the CTRL-C
+ // Remove all unprocessed input (typeahead) before the CTRL-C.
rbuffer_consumed(input_buffer, consume_count);
}
}