mirror of
https://github.com/vim/vim.git
synced 2025-10-28 09:27:14 -04:00
updated for version 7.3.032
Problem: maparg() doesn't return the flags, such as <buffer>, <script>,
<silent>. These are needed to save and restore a mapping.
Solution: Improve maparg(). (also by Christian Brabandt)
This commit is contained in:
16
src/testdir/test75.in
Normal file
16
src/testdir/test75.in
Normal file
@@ -0,0 +1,16 @@
|
||||
" Tests for functions.
|
||||
|
||||
STARTTEST
|
||||
:so small.vim
|
||||
:" Test maparg() with a string result
|
||||
:map foo<C-V> is<F4>foo
|
||||
:vnoremap <script> <buffer> <expr> <silent> bar isbar
|
||||
:call append('$', maparg('foo<C-V>'))
|
||||
:call append('$', string(maparg('foo<C-V>', '', 0, 1)))
|
||||
:call append('$', string(maparg('bar', '', 0, 1)))
|
||||
:"
|
||||
:/^eof/+1,$w! test.out
|
||||
:qa!
|
||||
ENDTEST
|
||||
|
||||
eof
|
||||
3
src/testdir/test75.ok
Normal file
3
src/testdir/test75.ok
Normal file
@@ -0,0 +1,3 @@
|
||||
is<F4>foo
|
||||
{'silent': 0, 'noremap': 0, 'lhs': 'foo<C-V>', 'mode': ' ', 'expr': 0, 'sid': 0, 'rhs': 'is<F4>foo', 'buffer': 0}
|
||||
{'silent': 1, 'noremap': 1, 'lhs': 'bar', 'mode': 'v', 'expr': 1, 'sid': 0, 'rhs': 'isbar', 'buffer': 1}
|
||||
Reference in New Issue
Block a user