diff options
author | zeertzjq <zeertzjq@outlook.com> | 2022-05-09 12:16:19 +0100 |
---|---|---|
committer | Bram Moolenaar <Bram@vim.org> | 2022-05-09 12:16:19 +0100 |
commit | 0519ce00394474055bd58c089ea90a19986443eb (patch) | |
tree | f4d1447bec6c7b3e1977f9bdc7b811eb27c63a0d /src/testdir/test_mapping.vim | |
parent | 194843028ed486366b89e8f7d3bdd611a11ce7b4 (diff) |
patch 8.2.4924: maparg() may return a string that cannot be reusedv8.2.4924
Problem: maparg() may return a string that cannot be reused.
Solution: use msg_outtrans_special() instead of str2special().
(closes #10384)
Diffstat (limited to 'src/testdir/test_mapping.vim')
-rw-r--r-- | src/testdir/test_mapping.vim | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/src/testdir/test_mapping.vim b/src/testdir/test_mapping.vim index e886424fb1..2b5613b889 100644 --- a/src/testdir/test_mapping.vim +++ b/src/testdir/test_mapping.vim @@ -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>'], |