diff options
author | Bram Moolenaar <Bram@vim.org> | 2020-12-27 18:03:22 +0100 |
---|---|---|
committer | Bram Moolenaar <Bram@vim.org> | 2020-12-27 18:03:22 +0100 |
commit | 179eb567b15a2ed5cf25b45d95d06c7a729d50bc (patch) | |
tree | 56ba1d1bd23bbc70dbbaac4c184bb7ffbd4f2392 | |
parent | 39cb2dab18e85fc60f116a4543e433616872b690 (diff) | |
download | vim-git-179eb567b15a2ed5cf25b45d95d06c7a729d50bc.tar.gz |
patch 8.2.2230: Vim9: insert completion runs into errorv8.2.2230
Problem: Vim9: insert completion runs into error.
Solution: Insert colon before range. (closes #7556)
-rw-r--r-- | src/insexpand.c | 2 | ||||
-rw-r--r-- | src/testdir/test_vim9_cmd.vim | 19 | ||||
-rw-r--r-- | src/version.c | 2 |
3 files changed, 22 insertions, 1 deletions
diff --git a/src/insexpand.c b/src/insexpand.c index 73b2218e1..02f593d7c 100644 --- a/src/insexpand.c +++ b/src/insexpand.c @@ -1020,7 +1020,7 @@ ins_compl_show_pum(void) #if defined(FEAT_EVAL) // Dirty hard-coded hack: remove any matchparen highlighting. - do_cmdline_cmd((char_u *)"if exists('g:loaded_matchparen')|3match none|endif"); + do_cmdline_cmd((char_u *)"if exists('g:loaded_matchparen')|:3match none|endif"); #endif // Update the screen later, before drawing the popup menu over it. diff --git a/src/testdir/test_vim9_cmd.vim b/src/testdir/test_vim9_cmd.vim index b6644e394..96311a5c6 100644 --- a/src/testdir/test_vim9_cmd.vim +++ b/src/testdir/test_vim9_cmd.vim @@ -816,4 +816,23 @@ def Test_gdefault_not_used() bwipe! enddef +def g:SomeComplFunc(findstart: number, base: string): any + if findstart + return 0 + else + return ['aaa', 'bbb'] + endif +enddef + +def Test_insert_complete() + # this was running into an error with the matchparen hack + new + set completefunc=SomeComplFunc + feedkeys("i\<c-x>\<c-u>\<Esc>", 'ntx') + assert_equal('aaa', getline(1)) + + set completefunc= + bwipe! +enddef + " vim: ts=8 sw=2 sts=2 expandtab tw=80 fdm=marker diff --git a/src/version.c b/src/version.c index adfaf50eb..51a9e4299 100644 --- a/src/version.c +++ b/src/version.c @@ -751,6 +751,8 @@ static char *(features[]) = static int included_patches[] = { /* Add new patch number below this line */ /**/ + 2230, +/**/ 2229, /**/ 2228, |