vim-patch:8.2.0824: still not enough memory allocated when converting string

Problem:    Still not enough memory allocated when converting string with
            special character.
Solution:   Reserve space for expanding K_SPECIAL. (closes vim/vim#6130)
1919371b2b
This commit is contained in:
Jan Edmund Lazo
2020-09-18 21:38:51 -04:00
parent ccfb69ab36
commit d3e0d29919
2 changed files with 5 additions and 3 deletions

View File

@@ -1374,6 +1374,7 @@ func Test_nr2char()
call assert_equal('a', nr2char(97, 0))
call assert_equal("\x80\xfc\b\xf4\x80\xfeX\x80\xfeX\x80\xfeX", eval('"\<M-' .. nr2char(0x100000) .. '>"'))
call assert_equal("\x80\xfc\b\xfd\x80\xfeX\x80\xfeX\x80\xfeX\x80\xfeX\x80\xfeX", eval('"\<M-' .. nr2char(0x40000000) .. '>"'))
endfunc
" vim: shiftwidth=2 sts=2 expandtab