Skip to content

Commit af559d2

Browse files
committed
patch 8.1.0258: not enough testing for the CompleteDone event
Problem: Not enough testing for the CompleteDone event. Solution: Add a test. (closes #3297)
1 parent bfde0b4 commit af559d2

2 files changed

Lines changed: 15 additions & 0 deletions

File tree

src/testdir/test_ins_complete.vim

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -262,6 +262,19 @@ function Test_CompleteDoneList()
262262
au! CompleteDone
263263
endfunc
264264

265+
func Test_CompleteDone_undo()
266+
au CompleteDone * call append(0, "prepend1")
267+
new
268+
call setline(1, ["line1", "line2"])
269+
call feedkeys("Go\<C-X>\<C-N>\<CR>\<ESC>", "tx")
270+
call assert_equal(["prepend1", "line1", "line2", "line1", ""],
271+
\ getline(1, '$'))
272+
undo
273+
call assert_equal(["line1", "line2"], getline(1, '$'))
274+
bwipe!
275+
au! CompleteDone
276+
endfunc
277+
265278
" Check that when using feedkeys() typeahead does not interrupt searching for
266279
" completions.
267280
func Test_compl_feedkeys()

src/version.c

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

795795
static int included_patches[] =
796796
{ /* Add new patch number below this line */
797+
/**/
798+
258,
797799
/**/
798800
257,
799801
/**/

0 commit comments

Comments
 (0)