0
0
mirror of https://github.com/vim/vim.git synced 2025-09-26 04:04:07 -04:00

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 #6130)
This commit is contained in:
Bram Moolenaar
2020-05-25 23:01:42 +02:00
parent 25e0f5863e
commit 1919371b2b
3 changed files with 7 additions and 3 deletions

View File

@@ -2280,6 +2280,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
" Test for screenattr(), screenchar() and screenchars() functions