1
0
forked from aniani/vim

patch 8.2.4924: maparg() may return a string that cannot be reused

Problem:    maparg() may return a string that cannot be reused.
Solution:   use msg_outtrans_special() instead of str2special().
            (closes #10384)
This commit is contained in:
zeertzjq
2022-05-09 12:16:19 +01:00
committed by Bram Moolenaar
parent 194843028e
commit 0519ce0039
6 changed files with 60 additions and 21 deletions

View File

@@ -502,6 +502,13 @@ func Test_list_mappings()
call assert_equal(['n <M-…> foo'],
\ execute('nmap <M-…>')->trim()->split("\n"))
" illegal bytes
let str = ":\x7f:\x80:\x90:\xd0:"
exe 'nmap foo ' .. str
call assert_equal(['n foo ' .. strtrans(str)],
\ execute('nmap foo')->trim()->split("\n"))
unlet str
" map to CTRL-V
exe "nmap ,k \<C-V>"
call assert_equal(['n ,k <Nop>'],