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:
@@ -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>'],
|
||||
|
Reference in New Issue
Block a user