comparison src/testdir/test_mapping.vim @ 28800:fea88e555652 v8.2.4924

patch 8.2.4924: maparg() may return a string that cannot be reused Commit: https://github.com/vim/vim/commit/0519ce00394474055bd58c089ea90a19986443eb Author: zeertzjq <zeertzjq@outlook.com> Date: Mon May 9 12:16:19 2022 +0100 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)
author Bram Moolenaar <Bram@vim.org>
date Mon, 09 May 2022 13:30:03 +0200
parents 141fb1d233ba
children ae39554ad2ee
comparison
equal deleted inserted replaced
28799:6f38b93c8683 28800:fea88e555652
499 499
500 " modified character with K_SPECIAL byte in lhs 500 " modified character with K_SPECIAL byte in lhs
501 nmap <M-…> foo 501 nmap <M-…> foo
502 call assert_equal(['n <M-…> foo'], 502 call assert_equal(['n <M-…> foo'],
503 \ execute('nmap <M-…>')->trim()->split("\n")) 503 \ execute('nmap <M-…>')->trim()->split("\n"))
504
505 " illegal bytes
506 let str = ":\x7f:\x80:\x90:\xd0:"
507 exe 'nmap foo ' .. str
508 call assert_equal(['n foo ' .. strtrans(str)],
509 \ execute('nmap foo')->trim()->split("\n"))
510 unlet str
504 511
505 " map to CTRL-V 512 " map to CTRL-V
506 exe "nmap ,k \<C-V>" 513 exe "nmap ,k \<C-V>"
507 call assert_equal(['n ,k <Nop>'], 514 call assert_equal(['n ,k <Nop>'],
508 \ execute('nmap ,k')->trim()->split("\n")) 515 \ execute('nmap ,k')->trim()->split("\n"))