aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/ex_getln.c
diff options
context:
space:
mode:
authorzeertzjq <zeertzjq@outlook.com>2022-04-27 17:34:40 +0800
committerzeertzjq <zeertzjq@outlook.com>2022-04-29 15:51:04 +0800
commit78a7e2d55ccb589c26e45498ff501c64b0b17519 (patch)
tree44644e0ee9c88cb49fd8efd83e15e43c1c7aeb96 /src/nvim/ex_getln.c
parent3090648584024075c741fe1bee5d7a92d0543f23 (diff)
downloadrneovim-78a7e2d55ccb589c26e45498ff501c64b0b17519.tar.gz
rneovim-78a7e2d55ccb589c26e45498ff501c64b0b17519.tar.bz2
rneovim-78a7e2d55ccb589c26e45498ff501c64b0b17519.zip
vim-patch:8.1.2346: CTRL-R CTRL-R doesn't work with modifyOtherKeys
Problem: CTRL-R CTRL-R doesn't work with modifyOtherKeys. Solution: Allow key codes when fetching argument for CTRL-R. (closes vim/vim#5266) Also fix CTRL-G in Insert mode. https://github.com/vim/vim/commit/38571a04b4eb2853f46df8884750bcb9a8115db8 Omit test as it sends terminal codes. Use a Lua test instead.
Diffstat (limited to 'src/nvim/ex_getln.c')
-rw-r--r--src/nvim/ex_getln.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/nvim/ex_getln.c b/src/nvim/ex_getln.c
index f9ce156eb2..35fd900391 100644
--- a/src/nvim/ex_getln.c
+++ b/src/nvim/ex_getln.c
@@ -1891,6 +1891,7 @@ static int command_line_handle_key(CommandLineState *s)
case Ctrl_R: { // insert register
putcmdline('"', true);
no_mapping++;
+ allow_keys++;
int i = s->c = plain_vgetc(); // CTRL-R <char>
if (i == Ctrl_O) {
i = Ctrl_R; // CTRL-R CTRL-O == CTRL-R CTRL-R
@@ -1899,7 +1900,8 @@ static int command_line_handle_key(CommandLineState *s)
if (i == Ctrl_R) {
s->c = plain_vgetc(); // CTRL-R CTRL-R <char>
}
- --no_mapping;
+ no_mapping--;
+ allow_keys--;
// Insert the result of an expression.
// Need to save the current command line, to be able to enter
// a new one...