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>
diff --git a/src/testdir/test_mapping.vim b/src/testdir/test_mapping.vim
index 654a673..064f8ac 100644
--- a/src/testdir/test_mapping.vim
+++ b/src/testdir/test_mapping.vim
@@ -1789,11 +1789,11 @@
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