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:
cangscop
2019-07-28 00:19:41 +02:00
parent 0364e47ccb
commit dedcd3ad1e

View File

@@ -250,6 +250,31 @@ func Test_omni_dash()
set omnifunc=
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
" completions.
func Test_compl_feedkeys()