When :source following script, if pass multibute string which include 0x5c in trail byte to the command, E114, E116 occur.
--------- scriptencoding utf-8 function! s:Foo(s) echo a:s endfunction command! -nargs=? Foo1 :call <SID>Foo(<args>) command! -nargs=? Foo2 :call <SID>Foo(<f-args>) command! -nargs=? Foo3 :call <SID>Foo(<q-args>) "Foo1 XX "Foo2 XX "Foo3 XX --------- * XX mean multibyte which include 0x5c in trail byte. Patch is here: https://gist.github.com/1618438 ( https://raw.github.com/gist/1618438/gistfile1.diff ) diff -r 0dabc2ce136c src/ex_docmd.c --- a/src/ex_docmd.c Tue Jan 10 22:31:32 2012 +0100 +++ b/src/ex_docmd.c Mon Jan 16 10:11:47 2012 +0900 @@ -5969,6 +5969,10 @@ { if (*p == '\\' || *p == '"') ++result; +#ifdef FEAT_MBYTE + if (enc_dbcs != 0 && (*mb_ptr2len)(p) > 1) + ++p; +#endif } if (buf != NULL) @@ -5979,6 +5983,13 @@ if (*p == '\\' || *p == '"') *buf++ = '\\'; *buf++ = *p; +#ifdef FEAT_MBYTE + if (enc_dbcs != 0 && (*mb_ptr2len)(p) > 1) + { + ++p; + *buf++ = *p; + } +#endif } *buf = '"'; } - Yasuhiro Matsumoto -- You received this message from the "vim_dev" maillist. Do not top-post! Type your reply below the text you are replying to. For more information, visit http://www.vim.org/maillist.php
