mirror of
https://github.com/neovim/neovim.git
synced 2025-09-14 07:18:17 +00:00
Merge pull request #17191 from zeertzjq/vim-8.2.4203
vim-patch:8.2.4203: entering a character with CTRL-V may include modifiers
This commit is contained in:
@@ -5635,8 +5635,12 @@ int get_literal(void)
|
||||
i = 0;
|
||||
for (;;) {
|
||||
nc = plain_vgetc();
|
||||
if (!(State & CMDLINE)
|
||||
&& MB_BYTE2LEN_CHECK(nc) == 1) {
|
||||
if ((mod_mask & ~MOD_MASK_SHIFT) != 0) {
|
||||
// A character with non-Shift modifiers should not be a valid
|
||||
// character for i_CTRL-V_digit.
|
||||
break;
|
||||
}
|
||||
if (!(State & CMDLINE) && MB_BYTE2LEN_CHECK(nc) == 1) {
|
||||
add_to_showcmd(nc);
|
||||
}
|
||||
if (nc == 'x' || nc == 'X') {
|
||||
@@ -5702,6 +5706,8 @@ int get_literal(void)
|
||||
--no_mapping;
|
||||
if (nc) {
|
||||
vungetc(nc);
|
||||
// A character typed with i_CTRL-V_digit cannot have modifiers.
|
||||
mod_mask = 0;
|
||||
}
|
||||
got_int = false; // CTRL-C typed after CTRL-V is not an interrupt
|
||||
return cc;
|
||||
|
Reference in New Issue
Block a user