summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBram Moolenaar <Bram@vim.org>2018-08-08 22:55:41 +0200
committerBram Moolenaar <Bram@vim.org>2018-08-08 22:55:41 +0200
commitaf559d2c9f44bc88a7d94f9236b3c024563a8e73 (patch)
treecd183d4457cded135f3c5e44a01a887fee6c1586
parentbfde0b482d25db43e9fc5a35c771b859b1eb8828 (diff)
downloadvim-git-af559d2c9f44bc88a7d94f9236b3c024563a8e73.tar.gz
patch 8.1.0258: not enough testing for the CompleteDone eventv8.1.0258
Problem: Not enough testing for the CompleteDone event. Solution: Add a test. (closes #3297)
-rw-r--r--src/testdir/test_ins_complete.vim13
-rw-r--r--src/version.c2
2 files changed, 15 insertions, 0 deletions
diff --git a/src/testdir/test_ins_complete.vim b/src/testdir/test_ins_complete.vim
index 2cd29b575..f7e1590ef 100644
--- a/src/testdir/test_ins_complete.vim
+++ b/src/testdir/test_ins_complete.vim
@@ -262,6 +262,19 @@ function Test_CompleteDoneList()
au! CompleteDone
endfunc
+func Test_CompleteDone_undo()
+ au CompleteDone * call append(0, "prepend1")
+ new
+ call setline(1, ["line1", "line2"])
+ call feedkeys("Go\<C-X>\<C-N>\<CR>\<ESC>", "tx")
+ call assert_equal(["prepend1", "line1", "line2", "line1", ""],
+ \ getline(1, '$'))
+ undo
+ call assert_equal(["line1", "line2"], getline(1, '$'))
+ bwipe!
+ au! CompleteDone
+endfunc
+
" Check that when using feedkeys() typeahead does not interrupt searching for
" completions.
func Test_compl_feedkeys()
diff --git a/src/version.c b/src/version.c
index 36376e9e5..4f31d66e8 100644
--- a/src/version.c
+++ b/src/version.c
@@ -795,6 +795,8 @@ static char *(features[]) =
static int included_patches[] =
{ /* Add new patch number below this line */
/**/
+ 258,
+/**/
257,
/**/
256,