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,12 +1768,19 @@ vgetc(void)
|
|||||||
{
|
{
|
||||||
// A modifier was not used for a mapping, apply it to ASCII
|
// A modifier was not used for a mapping, apply it to ASCII
|
||||||
// keys. Shift would already have been applied.
|
// keys. Shift would already have been applied.
|
||||||
if ((mod_mask & MOD_MASK_CTRL)
|
if (mod_mask & MOD_MASK_CTRL)
|
||||||
&& ((c >= '`' && c <= 0x7f)
|
|
||||||
|| (c >= '@' && c <= '_')))
|
|
||||||
{
|
{
|
||||||
c &= 0x1f;
|
if ((c >= '`' && c <= 0x7f) || (c >= '@' && c <= '_'))
|
||||||
mod_mask &= ~MOD_MASK_CTRL;
|
{
|
||||||
|
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))
|
if ((mod_mask & (MOD_MASK_META | MOD_MASK_ALT))
|
||||||
&& c >= 0 && c <= 127)
|
&& c >= 0 && c <= 127)
|
||||||
|
@@ -1192,6 +1192,14 @@ func RunTest_modifyOtherKeys(func)
|
|||||||
call feedkeys('a' .. a:func('X', 9) .. "\<Esc>", 'Lx!')
|
call feedkeys('a' .. a:func('X', 9) .. "\<Esc>", 'Lx!')
|
||||||
call assert_equal("Ø", getline(1))
|
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!
|
bwipe!
|
||||||
set timeoutlen&
|
set timeoutlen&
|
||||||
endfunc
|
endfunc
|
||||||
|
@@ -737,6 +737,8 @@ static char *(features[]) =
|
|||||||
|
|
||||||
static int included_patches[] =
|
static int included_patches[] =
|
||||||
{ /* Add new patch number below this line */
|
{ /* Add new patch number below this line */
|
||||||
|
/**/
|
||||||
|
2333,
|
||||||
/**/
|
/**/
|
||||||
2332,
|
2332,
|
||||||
/**/
|
/**/
|
||||||
|
Reference in New Issue
Block a user