1
0
forked from aniani/vim

patch 9.1.0644: Unnecessary STRLEN() when applying mapping

Problem:  Unnecessary STRLEN() when applying mapping.
          (after v9.1.0642)
Solution: Use m_keylen and vim_strnsave().
          (zeertzjq)

closes: #15394

Signed-off-by: zeertzjq <zeertzjq@outlook.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
This commit is contained in:
zeertzjq
2024-07-30 19:17:56 +02:00
committed by Christian Brabandt
parent c4be066817
commit 74011dc1fa
3 changed files with 11 additions and 6 deletions

View File

@@ -1789,11 +1789,11 @@ func Test_map_rhs_starts_with_lhs()
endif
let @a = 'foo'
call feedkeys("S\<C-R>a", 'tx')
call assert_nobeep('call feedkeys("S\<C-R>a", "tx")')
call assert_equal('foo', getline('.'))
let @a = 'bar'
call feedkeys("S\<*C-R>a", 'tx')
call assert_nobeep('call feedkeys("S\<*C-R>a", "tx")')
call assert_equal('bar', getline('.'))
endfor
endfor