Skip to content

Commit 60ef3e8

Browse files
committed
patch 8.0.0053
Problem: No test for what 8.0.0047 fixes. Solution: Add a test. (Hirohito Higashi)
1 parent 35a1f59 commit 60ef3e8

2 files changed

Lines changed: 29 additions & 1 deletion

File tree

src/testdir/test_popup.vim

Lines changed: 27 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -378,7 +378,7 @@ func DummyCompleteFour(findstart, base)
378378
endif
379379
endfunc
380380

381-
" Test that 'completefunc' works when it's OK.
381+
" Test that 'omnifunc' works when it's OK.
382382
func Test_omnifunc_with_check()
383383
new
384384
setlocal omnifunc=DummyCompleteFour
@@ -437,5 +437,31 @@ func Test_complete_no_undo()
437437
q!
438438
endfunc
439439

440+
function! DummyCompleteFive(findstart, base)
441+
if a:findstart
442+
return 0
443+
else
444+
return [
445+
\ { 'word': 'January', 'info': "info1-1\n1-2\n1-3" },
446+
\ { 'word': 'February', 'info': "info2-1\n2-2\n2-3" },
447+
\ { 'word': 'March', 'info': "info3-1\n3-2\n3-3" },
448+
\ { 'word': 'April', 'info': "info4-1\n4-2\n4-3" },
449+
\ { 'word': 'May', 'info': "info5-1\n5-2\n5-3" },
450+
\ ]
451+
endif
452+
endfunc
453+
454+
" Test that 'completefunc' on Scratch buffer with preview window works when
455+
" it's OK.
456+
func Test_completefunc_with_scratch_buffer()
457+
new +setlocal\ buftype=nofile\ bufhidden=wipe\ noswapfile
458+
set completeopt+=preview
459+
setlocal completefunc=DummyCompleteFive
460+
call feedkeys("A\<C-X>\<C-U>\<C-N>\<C-N>\<C-N>\<Esc>", "x")
461+
call assert_equal(['April'], getline(1, '$'))
462+
pclose
463+
q!
464+
set completeopt&
465+
endfunc
440466

441467
" vim: shiftwidth=2 sts=2 expandtab

src/version.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -764,6 +764,8 @@ static char *(features[]) =
764764

765765
static int included_patches[] =
766766
{ /* Add new patch number below this line */
767+
/**/
768+
53,
767769
/**/
768770
52,
769771
/**/

0 commit comments

Comments
 (0)