diff options
author | Bram Moolenaar <Bram@vim.org> | 2017-11-02 15:44:14 +0100 |
---|---|---|
committer | Bram Moolenaar <Bram@vim.org> | 2017-11-02 15:44:14 +0100 |
commit | ffd99f729bd806e09d9355ede9c17780b61057bf (patch) | |
tree | da7d97abd95882da43082199094045864b49e26e /src/testdir/test_ins_complete.vim | |
parent | 89c394faca40d2f5d57705432a433173b295bf73 (diff) |
patch 8.0.1242: function argument with only dash is seen as number zerov8.0.1242
Problem: Function argument with only dash is seen as number zero. (Wang
Shidong)
Solution: See a dash as a string. (Christian Brabandt)
Diffstat (limited to 'src/testdir/test_ins_complete.vim')
-rw-r--r-- | src/testdir/test_ins_complete.vim | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/src/testdir/test_ins_complete.vim b/src/testdir/test_ins_complete.vim index bdad26a8c7..d25267ff4e 100644 --- a/src/testdir/test_ins_complete.vim +++ b/src/testdir/test_ins_complete.vim @@ -90,3 +90,22 @@ func Test_ins_complete() call delete('Xtestdata') set cpt& cot& def& tags& tagbsearch& hidden& endfunc + +func Test_omni_dash() + func Omni(findstart, base) + if a:findstart + return 5 + else + echom a:base + return ['-help', '-v'] + endif + endfunc + set omnifunc=Omni + new + exe "normal Gofind -\<C-x>\<C-o>" + call assert_equal("\n-\nmatch 1 of 2", execute(':2mess')) + + bwipe! + delfunc Omni + set omnifunc= +endfunc |