forked from aniani/vim
patch 8.1.1857: cannot use modifier with multi-byte character
Problem: Cannot use modifier with multi-byte character. Solution: Allow using a multi-byte character, although it doesn't work everywhere.
This commit is contained in:
parent
78d629a385
commit
c8fd33d18b
@ -2819,10 +2819,10 @@ find_special_key(
|
|||||||
l = mb_ptr2len(bp + 1);
|
l = mb_ptr2len(bp + 1);
|
||||||
else
|
else
|
||||||
l = 1;
|
l = 1;
|
||||||
/* Anything accepted, like <C-?>.
|
// Anything accepted, like <C-?>.
|
||||||
* <C-"> or <M-"> are not special in strings as " is
|
// <C-"> or <M-"> are not special in strings as " is
|
||||||
* the string delimiter. With a backslash it works: <M-\"> */
|
// the string delimiter. With a backslash it works: <M-\">
|
||||||
if (!(in_string && bp[1] == '"') && bp[2] == '>')
|
if (!(in_string && bp[1] == '"') && bp[l + 1] == '>')
|
||||||
bp += l;
|
bp += l;
|
||||||
else if (in_string && bp[1] == '\\' && bp[2] == '"'
|
else if (in_string && bp[1] == '\\' && bp[2] == '"'
|
||||||
&& bp[3] == '>')
|
&& bp[3] == '>')
|
||||||
|
@ -239,6 +239,12 @@ func Test_map_meta_quotes()
|
|||||||
iunmap <M-">
|
iunmap <M-">
|
||||||
endfunc
|
endfunc
|
||||||
|
|
||||||
|
func Test_map_meta_multibyte()
|
||||||
|
imap <M-á> foo
|
||||||
|
call assert_equal('foo', maparg("\<M-á>", 'i'))
|
||||||
|
iunmap <M-á>
|
||||||
|
endfunc
|
||||||
|
|
||||||
func Test_abbr_after_line_join()
|
func Test_abbr_after_line_join()
|
||||||
new
|
new
|
||||||
abbr foo bar
|
abbr foo bar
|
||||||
@ -292,7 +298,7 @@ func Test_map_timeout_with_timer_interrupt()
|
|||||||
let g:val = 0
|
let g:val = 0
|
||||||
nnoremap \12 :let g:val = 1<CR>
|
nnoremap \12 :let g:val = 1<CR>
|
||||||
nnoremap \123 :let g:val = 2<CR>
|
nnoremap \123 :let g:val = 2<CR>
|
||||||
set timeout timeoutlen=1000
|
set timeout timeoutlen=100
|
||||||
|
|
||||||
func ExitCb(job, status)
|
func ExitCb(job, status)
|
||||||
let g:timer = timer_start(1, {-> feedkeys("3\<Esc>", 't')})
|
let g:timer = timer_start(1, {-> feedkeys("3\<Esc>", 't')})
|
||||||
|
@ -769,6 +769,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 */
|
||||||
|
/**/
|
||||||
|
1857,
|
||||||
/**/
|
/**/
|
||||||
1856,
|
1856,
|
||||||
/**/
|
/**/
|
||||||
|
Loading…
x
Reference in New Issue
Block a user