From dedcd3ad1e87f5130dd6d32ec6cfe642553bcb39 Mon Sep 17 00:00:00 2001 From: cangscop Date: Sun, 28 Jul 2019 00:19:41 +0200 Subject: 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 --- src/nvim/testdir/test_ins_complete.vim | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) (limited to 'src') diff --git a/src/nvim/testdir/test_ins_complete.vim b/src/nvim/testdir/test_ins_complete.vim index 071e82579e..7f52481ba8 100644 --- a/src/nvim/testdir/test_ins_complete.vim +++ b/src/nvim/testdir/test_ins_complete.vim @@ -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\\\", '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\\\", '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() -- cgit