forked from aniani/vim
patch 8.1.2333: with modifyOtherKeys CTRL-^ doesn't work
Problem: With modifyOtherKeys CTRL-^ doesn't work. Solution: Handle the exception.
This commit is contained in:
@@ -1768,13 +1768,20 @@ vgetc(void)
|
||||
{
|
||||
// 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)
|
||||
&& ((c >= '`' && c <= 0x7f)
|
||||
|| (c >= '@' && c <= '_')))
|
||||
if (mod_mask & MOD_MASK_CTRL)
|
||||
{
|
||||
if ((c >= '`' && c <= 0x7f) || (c >= '@' && c <= '_'))
|
||||
{
|
||||
c &= 0x1f;
|
||||
mod_mask &= ~MOD_MASK_CTRL;
|
||||
}
|
||||
else if (c == '6')
|
||||
{
|
||||
// CTRL-6 is equivalent to CTRL-^
|
||||
c = 0x1e;
|
||||
mod_mask &= ~MOD_MASK_CTRL;
|
||||
}
|
||||
}
|
||||
if ((mod_mask & (MOD_MASK_META | MOD_MASK_ALT))
|
||||
&& c >= 0 && c <= 127)
|
||||
{
|
||||
|
@@ -1192,6 +1192,14 @@ func RunTest_modifyOtherKeys(func)
|
||||
call feedkeys('a' .. a:func('X', 9) .. "\<Esc>", 'Lx!')
|
||||
call assert_equal("Ø", getline(1))
|
||||
|
||||
" Ctrl-6 is Ctrl-^
|
||||
split aaa
|
||||
edit bbb
|
||||
call feedkeys(a:func('6', 5), 'Lx!')
|
||||
call assert_equal("aaa", bufname())
|
||||
bwipe aaa
|
||||
bwipe bbb
|
||||
|
||||
bwipe!
|
||||
set timeoutlen&
|
||||
endfunc
|
||||
|
@@ -737,6 +737,8 @@ static char *(features[]) =
|
||||
|
||||
static int included_patches[] =
|
||||
{ /* Add new patch number below this line */
|
||||
/**/
|
||||
2333,
|
||||
/**/
|
||||
2332,
|
||||
/**/
|
||||
|
Reference in New Issue
Block a user