vim-patch:8.2.4858: K_SPECIAL may be escaped twice

Problem:    K_SPECIAL may be escaped twice.
Solution:   Avoid double escaping. (closes vim/vim#10340)
db08887f24
This commit is contained in:
zeertzjq
2022-05-03 06:11:22 +08:00
parent ddf7bb24f9
commit 27149e0071
8 changed files with 69 additions and 20 deletions

View File

@@ -1751,8 +1751,8 @@ func Test_nr2char()
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) .. '>"'))
call assert_equal("\x80\xfc\b\xfd\x80\xfeX\x80\xfeX\x80\xfeX\x80\xfeX\x80\xfeX", eval('"\<M-' .. nr2char(0x40000000) .. '>"'))
call assert_equal("\x80\xfc\b" .. nr2char(0x100000), eval('"\<M-' .. nr2char(0x100000) .. '>"'))
call assert_equal("\x80\xfc\b" .. nr2char(0x40000000), eval('"\<M-' .. nr2char(0x40000000) .. '>"'))
endfunc
" Test for getcurpos() and setpos()