mirror of
https://github.com/neovim/neovim.git
synced 2025-10-04 17:06:30 +00:00
vim-patch:9.1.1799: completion: crash with autcompletion (#35963)
Problem: completion: crash with autcompletion
(Maxim Kim)
Solution: Rework remove_old_matches (Girish Palya)
fixes: vim/vim#18378
fixes: vim/vim#18390
fixes: vim/vim#18391
closes: vim/vim#18427
3aa2edb557
Co-authored-by: Girish Palya <girishji@gmail.com>
This commit is contained in:
@@ -6080,4 +6080,33 @@ func Test_fuzzy_select_item_when_acl()
|
||||
call StopVimInTerminal(buf)
|
||||
endfunc
|
||||
|
||||
" Issue #18378: crash when fuzzy reorders items during refresh:always
|
||||
func Test_refresh_always_with_fuzzy()
|
||||
func ComplFunc1(findstart, base)
|
||||
if a:findstart
|
||||
return 1
|
||||
else
|
||||
return ['foo', 'foobar']
|
||||
endif
|
||||
endfunc
|
||||
func ComplFunc2(findstart, base)
|
||||
if a:findstart
|
||||
return 1
|
||||
else
|
||||
return #{words: ['foo'], refresh: 'always'}
|
||||
endif
|
||||
endfunc
|
||||
set complete=.,FComplFunc1,FComplFunc2
|
||||
set autocomplete
|
||||
call Ntest_override("char_avail", 1)
|
||||
new
|
||||
call setline(1, ['fox'])
|
||||
exe "normal! Gofo"
|
||||
bw!
|
||||
delfunc ComplFunc1
|
||||
delfunc ComplFunc2
|
||||
set complete& autocomplete&
|
||||
call Ntest_override("char_avail", 0)
|
||||
endfunc
|
||||
|
||||
" vim: shiftwidth=2 sts=2 expandtab nofoldenable
|
||||
|
Reference in New Issue
Block a user