mirror of
https://github.com/neovim/neovim.git
synced 2025-09-30 23:18:33 +00:00
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.
38571a04b4
Omit test as it sends terminal codes. Use a Lua test instead.
This commit is contained in:
@@ -7817,11 +7817,10 @@ static void ins_reg(void)
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
* Don't map the register name. This also prevents the mode message to be
|
||||
* deleted when ESC is hit.
|
||||
*/
|
||||
++no_mapping;
|
||||
// Don't map the register name. This also prevents the mode message to be
|
||||
// deleted when ESC is hit.
|
||||
no_mapping++;
|
||||
allow_keys++;
|
||||
regname = plain_vgetc();
|
||||
LANGMAP_ADJUST(regname, TRUE);
|
||||
if (regname == Ctrl_R || regname == Ctrl_O || regname == Ctrl_P) {
|
||||
@@ -7831,7 +7830,8 @@ static void ins_reg(void)
|
||||
regname = plain_vgetc();
|
||||
LANGMAP_ADJUST(regname, TRUE);
|
||||
}
|
||||
--no_mapping;
|
||||
no_mapping--;
|
||||
allow_keys--;
|
||||
|
||||
// Don't call u_sync() while typing the expression or giving an error
|
||||
// message for it. Only call it explicitly.
|
||||
@@ -7899,13 +7899,13 @@ static void ins_ctrl_g(void)
|
||||
// Right after CTRL-X the cursor will be after the ruler.
|
||||
setcursor();
|
||||
|
||||
/*
|
||||
* Don't map the second key. This also prevents the mode message to be
|
||||
* deleted when ESC is hit.
|
||||
*/
|
||||
++no_mapping;
|
||||
// Don't map the second key. This also prevents the mode message to be
|
||||
// deleted when ESC is hit.
|
||||
no_mapping++;
|
||||
allow_keys++;
|
||||
c = plain_vgetc();
|
||||
--no_mapping;
|
||||
no_mapping--;
|
||||
allow_keys--;
|
||||
switch (c) {
|
||||
// CTRL-G k and CTRL-G <Up>: cursor up to Insstart.col
|
||||
case K_UP:
|
||||
|
Reference in New Issue
Block a user