mirror of
https://github.com/neovim/neovim.git
synced 2025-10-21 17:21:49 +00:00
test: add a test for #17489
This commit is contained in:
@@ -1193,4 +1193,23 @@ describe('completion', function()
|
||||
eq('foobar', eval('g:word'))
|
||||
feed('<esc>')
|
||||
end)
|
||||
|
||||
it('does not crash if text is changed by first call to complete function #17489', function()
|
||||
source([[
|
||||
func Complete(findstart, base) abort
|
||||
if a:findstart
|
||||
let col = col('.')
|
||||
call complete_add('#')
|
||||
return col - 1
|
||||
else
|
||||
return []
|
||||
endif
|
||||
endfunc
|
||||
|
||||
set completeopt=longest
|
||||
set completefunc=Complete
|
||||
]])
|
||||
feed('ifoo#<C-X><C-U>')
|
||||
assert_alive()
|
||||
end)
|
||||
end)
|
||||
|
Reference in New Issue
Block a user