0
0
mirror of https://github.com/vim/vim.git synced 2025-10-05 05:34:07 -04:00

patch 8.2.2230: Vim9: insert completion runs into error

Problem:    Vim9: insert completion runs into error.
Solution:   Insert colon before range. (closes #7556)
This commit is contained in:
Bram Moolenaar
2020-12-27 18:03:22 +01:00
parent 39cb2dab18
commit 179eb567b1
3 changed files with 22 additions and 1 deletions

View File

@@ -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