Mercurial > vim
comparison src/testdir/test_popup.vim @ 17837:f71ee7b04f0b v8.1.1915
patch 8.1.1915: more functions can be used as methods
Commit: https://github.com/vim/vim/commit/1a3a89168d61c2fed91cbca812cf1c6983901b79
Author: Bram Moolenaar <Bram@vim.org>
Date: Fri Aug 23 22:31:37 2019 +0200
patch 8.1.1915: more functions can be used as methods
Problem: More functions can be used as methods.
Solution: Make various functions usable as a method.
author | Bram Moolenaar <Bram@vim.org> |
---|---|
date | Fri, 23 Aug 2019 22:45:04 +0200 |
parents | 45eca7143d7c |
children | de350001150c |
comparison
equal
deleted
inserted
replaced
17836:a3061757584b | 17837:f71ee7b04f0b |
---|---|
248 iunmap <F5> | 248 iunmap <F5> |
249 endfunc | 249 endfunc |
250 | 250 |
251 func Test_noinsert_complete() | 251 func Test_noinsert_complete() |
252 func! s:complTest1() abort | 252 func! s:complTest1() abort |
253 call complete(1, ['source', 'soundfold']) | 253 eval ['source', 'soundfold']->complete(1) |
254 return '' | 254 return '' |
255 endfunc | 255 endfunc |
256 | 256 |
257 func! s:complTest2() abort | 257 func! s:complTest2() abort |
258 call complete(1, ['source', 'soundfold']) | 258 call complete(1, ['source', 'soundfold']) |
401 func DummyCompleteFour(findstart, base) | 401 func DummyCompleteFour(findstart, base) |
402 if a:findstart | 402 if a:findstart |
403 return 0 | 403 return 0 |
404 else | 404 else |
405 call complete_add('four1') | 405 call complete_add('four1') |
406 call complete_add('four2') | 406 eval 'four2'->complete_add() |
407 call complete_check() | 407 call complete_check() |
408 call complete_add('four3') | 408 call complete_add('four3') |
409 call complete_add('four4') | 409 call complete_add('four4') |
410 call complete_check() | 410 call complete_check() |
411 call complete_add('four5') | 411 call complete_add('four5') |
991 | 991 |
992 func GetCompleteInfo() | 992 func GetCompleteInfo() |
993 if empty(g:compl_what) | 993 if empty(g:compl_what) |
994 let g:compl_info = complete_info() | 994 let g:compl_info = complete_info() |
995 else | 995 else |
996 let g:compl_info = complete_info(g:compl_what) | 996 let g:compl_info = g:compl_what->complete_info() |
997 endif | 997 endif |
998 return '' | 998 return '' |
999 endfunc | 999 endfunc |
1000 | 1000 |
1001 func Test_popup_complete_info_02() | 1001 func Test_popup_complete_info_02() |