mirror of
https://github.com/neovim/neovim.git
synced 2025-10-07 18:36:30 +00:00
vim-patch:8.1.0053 use typval_T in the caller of call_vim_function
Problem: unreliable types for complete function arguments Solution: fix argument type for functions w/ unreliable type conversion(Ozaki Kiichi) vim/vim#2993
This commit is contained in:
@@ -250,6 +250,31 @@ func Test_omni_dash()
|
|||||||
set omnifunc=
|
set omnifunc=
|
||||||
endfunc
|
endfunc
|
||||||
|
|
||||||
|
func Test_completefunc_args()
|
||||||
|
let s:args = []
|
||||||
|
func! CompleteFunc(findstart, base)
|
||||||
|
let s:args += [[a:findstart, empty(a:base)]]
|
||||||
|
endfunc
|
||||||
|
new
|
||||||
|
|
||||||
|
set completefunc=CompleteFunc
|
||||||
|
call feedkeys("i\<C-X>\<C-U>\<Esc>", 'x')
|
||||||
|
call assert_equal([1, 1], s:args[0])
|
||||||
|
call assert_equal(0, s:args[1][0])
|
||||||
|
set completefunc=
|
||||||
|
|
||||||
|
let s:args = []
|
||||||
|
set omnifunc=CompleteFunc
|
||||||
|
call feedkeys("i\<C-X>\<C-O>\<Esc>", 'x')
|
||||||
|
call assert_equal([1, 1], s:args[0])
|
||||||
|
call assert_equal(0, s:args[1][0])
|
||||||
|
set omnifunc=
|
||||||
|
|
||||||
|
bwipe!
|
||||||
|
unlet s:args
|
||||||
|
delfunc CompleteFunc
|
||||||
|
endfunc
|
||||||
|
|
||||||
" Check that when using feedkeys() typeahead does not interrupt searching for
|
" Check that when using feedkeys() typeahead does not interrupt searching for
|
||||||
" completions.
|
" completions.
|
||||||
func Test_compl_feedkeys()
|
func Test_compl_feedkeys()
|
||||||
|
Reference in New Issue
Block a user