mirror of
https://github.com/neovim/neovim.git
synced 2025-09-26 13:08:33 +00:00
vim-patch:partial:8.1.2333: with modifyOtherKeys CTRL-^ doesn't work (#18048)
Problem: With modifyOtherKeys CTRL-^ doesn't work.
Solution: Handle the exception.
828ffd5963
This commit is contained in:
@@ -1590,11 +1590,19 @@ int vgetc(void)
|
||||
c = utf_ptr2char(buf);
|
||||
}
|
||||
|
||||
if ((mod_mask & MOD_MASK_CTRL) && (c >= '?' && c <= '_')) {
|
||||
c = Ctrl_chr(c);
|
||||
mod_mask &= ~MOD_MASK_CTRL;
|
||||
if (c == 0) { // <C-@> is <Nul>
|
||||
c = K_ZERO;
|
||||
// A modifier was not used for a mapping, apply it to ASCII
|
||||
// keys. Shift would already have been applied.
|
||||
if (mod_mask & MOD_MASK_CTRL) {
|
||||
if ((c >= '`' && c <= 0x7f) || (c >= '@' && c <= '_')) {
|
||||
c &= 0x1f;
|
||||
mod_mask &= ~MOD_MASK_CTRL;
|
||||
if (c == 0) {
|
||||
c = K_ZERO;
|
||||
}
|
||||
} else if (c == '6') {
|
||||
// CTRL-6 is equivalent to CTRL-^
|
||||
c = 0x1e;
|
||||
mod_mask &= ~MOD_MASK_CTRL;
|
||||
}
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user