aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/misc1.c
diff options
context:
space:
mode:
authorJan Edmund Lazo <jan.lazo@mail.utoronto.ca>2021-05-20 21:21:29 -0400
committerJan Edmund Lazo <jan.lazo@mail.utoronto.ca>2021-05-21 23:01:11 -0400
commit486050ebc94d125b6a30340ec595ef62956624a7 (patch)
treef600e2fa5888e5273aa6a7ef69e09cf407a1755f /src/nvim/misc1.c
parent39fdb868322fe32f2dcc7187b6f2f698e24b93f8 (diff)
downloadrneovim-486050ebc94d125b6a30340ec595ef62956624a7.tar.gz
rneovim-486050ebc94d125b6a30340ec595ef62956624a7.tar.bz2
rneovim-486050ebc94d125b6a30340ec595ef62956624a7.zip
vim-patch:8.2.2875: cancelling inputlist() after a digit does not return zero
Problem: Cancelling inputlist() after a digit does not return zero. Solution: Always return zero when cancelling. (closes vim/vim#8231) https://github.com/vim/vim/commit/5cf94577cf2045fec87344d7d89422fe6dfce62f
Diffstat (limited to 'src/nvim/misc1.c')
-rw-r--r--src/nvim/misc1.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/nvim/misc1.c b/src/nvim/misc1.c
index 795af3d94a..38d0a7dadf 100644
--- a/src/nvim/misc1.c
+++ b/src/nvim/misc1.c
@@ -753,7 +753,10 @@ get_number (
skip_redraw = TRUE; /* skip redraw once */
do_redraw = FALSE;
break;
- } else if (c == CAR || c == NL || c == Ctrl_C || c == ESC || c == 'q') {
+ } else if (c == Ctrl_C || c == ESC || c == 'q') {
+ n = 0;
+ break;
+ } else if (c == CAR || c == NL) {
break;
}
}