diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/nvim/edit.c | 24 | ||||
-rw-r--r-- | src/nvim/ex_getln.c | 4 |
2 files changed, 15 insertions, 13 deletions
diff --git a/src/nvim/edit.c b/src/nvim/edit.c index 076cf445cf..251f55c6e7 100644 --- a/src/nvim/edit.c +++ b/src/nvim/edit.c @@ -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: 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... |