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_map_functions.vim | |
| parent | 194843028ed486366b89e8f7d3bdd611a11ce7b4 (diff) | |
| download | vim-git-8.2.4924.tar.gz | |
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_map_functions.vim')
| -rw-r--r-- | src/testdir/test_map_functions.vim | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/src/testdir/test_map_functions.vim b/src/testdir/test_map_functions.vim index 21c899048..e13807647 100644 --- a/src/testdir/test_map_functions.vim +++ b/src/testdir/test_map_functions.vim @@ -58,6 +58,20 @@ func Test_maparg() map abc y<S-char-114>y call assert_equal("yRy", maparg('abc')) + " character with K_SPECIAL byte + nmap abc … + call assert_equal('…', maparg('abc')) + + " modified character with K_SPECIAL byte + nmap abc <M-…> + call assert_equal('<M-…>', maparg('abc')) + + " illegal bytes + let str = ":\x7f:\x80:\x90:\xd0:" + exe 'nmap abc ' .. str + call assert_equal(str, maparg('abc')) + unlet str + omap { w let d = maparg('{', 'o', 0, 1) call assert_equal(['{', 'w', 'o'], [d.lhs, d.rhs, d.mode]) |
