summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorBram Moolenaar <Bram@vim.org>2019-08-16 20:33:05 +0200
committerBram Moolenaar <Bram@vim.org>2019-08-16 20:33:05 +0200
commitc8fd33d18b49c3246f33782dd7b4a1c87504dd5f (patch)
tree9a304072d99980e37b18d26ecf4aabbed167950c /src
parent78d629a38548115a68298081d39d6d90708af561 (diff)
patch 8.1.1857: cannot use modifier with multi-byte characterv8.1.1857
Problem: Cannot use modifier with multi-byte character. Solution: Allow using a multi-byte character, although it doesn't work everywhere.
Diffstat (limited to 'src')
-rw-r--r--src/misc2.c8
-rw-r--r--src/testdir/test_mapping.vim8
-rw-r--r--src/version.c2
3 files changed, 13 insertions, 5 deletions
diff --git a/src/misc2.c b/src/misc2.c
index 463b37b79d..db3687d71c 100644
--- a/src/misc2.c
+++ b/src/misc2.c
@@ -2819,10 +2819,10 @@ find_special_key(
l = mb_ptr2len(bp + 1);
else
l = 1;
- /* Anything accepted, like <C-?>.
- * <C-"> or <M-"> are not special in strings as " is
- * the string delimiter. With a backslash it works: <M-\"> */
- if (!(in_string && bp[1] == '"') && bp[2] == '>')
+ // Anything accepted, like <C-?>.
+ // <C-"> or <M-"> are not special in strings as " is
+ // the string delimiter. With a backslash it works: <M-\">
+ if (!(in_string && bp[1] == '"') && bp[l + 1] == '>')
bp += l;
else if (in_string && bp[1] == '\\' && bp[2] == '"'
&& bp[3] == '>')
diff --git a/src/testdir/test_mapping.vim b/src/testdir/test_mapping.vim
index 71548edda0..b189296b53 100644
--- a/src/testdir/test_mapping.vim
+++ b/src/testdir/test_mapping.vim
@@ -239,6 +239,12 @@ func Test_map_meta_quotes()
iunmap <M-">
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()
new
abbr foo bar
@@ -292,7 +298,7 @@ func Test_map_timeout_with_timer_interrupt()
let g:val = 0
nnoremap \12 :let g:val = 1<CR>
nnoremap \123 :let g:val = 2<CR>
- set timeout timeoutlen=1000
+ set timeout timeoutlen=100
func ExitCb(job, status)
let g:timer = timer_start(1, {-> feedkeys("3\<Esc>", 't')})
diff --git a/src/version.c b/src/version.c
index f7be012951..5bd944dfc1 100644
--- a/src/version.c
+++ b/src/version.c
@@ -770,6 +770,8 @@ static char *(features[]) =
static int included_patches[] =
{ /* Add new patch number below this line */
/**/
+ 1857,
+/**/
1856,
/**/
1855,