aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/ex_getln.c
diff options
context:
space:
mode:
authorzeertzjq <zeertzjq@outlook.com>2022-04-29 17:13:28 +0800
committerGitHub <noreply@github.com>2022-04-29 17:13:28 +0800
commit35a7b0f9b991e884eae81aa7393f9701b7b7b85e (patch)
tree127035623b99f2088be616fd316e162ede23e973 /src/nvim/ex_getln.c
parentc671822d4da5f8b772fff7acc3eae16df714e68f (diff)
parent3601cef1377937f01347b20a8c6c303f5f429f51 (diff)
downloadrneovim-35a7b0f9b991e884eae81aa7393f9701b7b7b85e.tar.gz
rneovim-35a7b0f9b991e884eae81aa7393f9701b7b7b85e.tar.bz2
rneovim-35a7b0f9b991e884eae81aa7393f9701b7b7b85e.zip
Merge pull request #17932 from zeertzjq/vim-8.1.2145
vim-patch:8.1.{2145,2159,2165,2167,2333,2346,2350},8.2.{0839,0851,0855,0867,0916,0919,2084,2728,3595,4504,4819,4824,4827,4828,4829,4833,4837}
Diffstat (limited to 'src/nvim/ex_getln.c')
-rw-r--r--src/nvim/ex_getln.c12
1 files changed, 10 insertions, 2 deletions
diff --git a/src/nvim/ex_getln.c b/src/nvim/ex_getln.c
index b7d75855d6..35fd900391 100644
--- a/src/nvim/ex_getln.c
+++ b/src/nvim/ex_getln.c
@@ -1335,8 +1335,10 @@ static int command_line_execute(VimState *state, int key)
// mode when 'insertmode' is set, CTRL-\ e prompts for an expression.
if (s->c == Ctrl_BSL) {
no_mapping++;
+ allow_keys++;
s->c = plain_vgetc();
no_mapping--;
+ allow_keys--;
// CTRL-\ e doesn't work when obtaining an expression, unless it
// is in a mapping.
if (s->c != Ctrl_N
@@ -1889,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
@@ -1897,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...
@@ -2208,7 +2212,11 @@ static int command_line_handle_key(CommandLineState *s)
case Ctrl_Q:
s->ignore_drag_release = true;
putcmdline('^', true);
- s->c = get_literal(); // get next (two) character(s)
+
+ // Get next (two) characters.
+ // Do not include modifiers into the key for CTRL-SHIFT-V.
+ s->c = get_literal(mod_mask & MOD_MASK_SHIFT);
+
s->do_abbr = false; // don't do abbreviation now
ccline.special_char = NUL;
// may need to remove ^ when composing char was typed