Problem: Vim9: insert completion runs into error.
Solution: Insert colon before range. (closes #7556)
#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.
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
static int included_patches[] =
{ /* Add new patch number below this line */
+/**/
+ 2230,
/**/
2229,
/**/