forked from aniani/vim
Problem: A buffer-local language mapping from a keymap stops a global
insert mode mapping from working. (Ron Aaron)
Solution: Do not wait for more characters to be typed only when the mapping
was defined with <nowait>.
25 lines
562 B
Plaintext
25 lines
562 B
Plaintext
" Tests for functions.
|
|
|
|
STARTTEST
|
|
:so small.vim
|
|
:set cpo-=<
|
|
:" 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)))
|
|
:map <buffer> <nowait> foo bar
|
|
:call append('$', string(maparg('foo', '', 0, 1)))
|
|
:"
|
|
:map abc x<char-114>x
|
|
:call append('$', maparg('abc'))
|
|
:map abc y<S-char-114>y
|
|
:call append('$', maparg('abc'))
|
|
:"
|
|
:/^eof/+1,$w! test.out
|
|
:qa!
|
|
ENDTEST
|
|
|
|
eof
|