diff options
author | zeertzjq <zeertzjq@outlook.com> | 2022-03-10 20:32:13 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-03-10 20:32:13 +0800 |
commit | 3a32aa96159ae1fdd0efd55389a4b1c2f92c98f7 (patch) | |
tree | 4dce94dcf97eb45765253bc9834e64a9ed014077 /test | |
parent | 9e9322b222566c0f92bb6df034d9b316317c81d5 (diff) | |
parent | a80ec88906220b6527c553f7614180ba3bfde169 (diff) | |
download | rneovim-3a32aa96159ae1fdd0efd55389a4b1c2f92c98f7.tar.gz rneovim-3a32aa96159ae1fdd0efd55389a4b1c2f92c98f7.tar.bz2 rneovim-3a32aa96159ae1fdd0efd55389a4b1c2f92c98f7.zip |
Merge pull request #17671 from zeertzjq/vim-8.2.3949
vim-patch:8.2.{3949,3950}: fix two crashes with /\%V
Diffstat (limited to 'test')
-rw-r--r-- | test/functional/editor/completion_spec.lua | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/test/functional/editor/completion_spec.lua b/test/functional/editor/completion_spec.lua index befad29922..1a0ee54505 100644 --- a/test/functional/editor/completion_spec.lua +++ b/test/functional/editor/completion_spec.lua @@ -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) |