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

patch 8.2.0817: not enough memory allocated when converting string

Problem:    Not enough memory allocated when converting string with special
            character.
Solution:   Reserve space for modifier code. (closes #6130)
This commit is contained in:
Bram Moolenaar
2020-05-24 18:45:07 +02:00
parent 87202264f8
commit f7271e8316
3 changed files with 12 additions and 3 deletions

View File

@@ -2278,6 +2278,8 @@ func Test_nr2char()
set encoding=utf8
call assert_equal('a', nr2char(97, 1))
call assert_equal('a', nr2char(97, 0))
call assert_equal("\x80\xfc\b\xf4\x80\xfeX\x80\xfeX\x80\xfeX", eval('"\<M-' .. nr2char(0x100000) .. '>"'))
endfunc
" Test for screenattr(), screenchar() and screenchars() functions