mirror of
https://github.com/neovim/neovim.git
synced 2025-12-16 03:15:39 +00:00
vim-patch:9.1.0896: completion list wrong after v9.1.0891
Problem: completion list wrong after v9.1.0891
Solution: update compl_mach_array after leader change
(glepnir)
compl_shown_match update not correct after refactoring in v9.1.0891
Unfortunately, this regressed what item is selected after leader change.
So generate compl_match_array before updating compl_shown_match range,
and split generate compl_match_array into range match_head
fixes: https://github.com/vim/vim/issues/16128
closes: https://github.com/vim/vim/pull/16129
a49c077a88
This commit is contained in:
@@ -1675,4 +1675,29 @@ func Test_pum_completeitemalign()
|
||||
call StopVimInTerminal(buf)
|
||||
endfunc
|
||||
|
||||
func Test_pum_keep_select()
|
||||
CheckScreendump
|
||||
let lines =<< trim END
|
||||
set completeopt=menu,menuone,noinsert
|
||||
END
|
||||
call writefile(lines, 'Xscript', 'D')
|
||||
let buf = RunVimInTerminal('-S Xscript', {})
|
||||
call TermWait(buf)
|
||||
|
||||
call term_sendkeys(buf, "ggSFab\<CR>Five\<CR>find\<CR>film\<CR>\<C-X>\<C-P>")
|
||||
call TermWait(buf, 50)
|
||||
call VerifyScreenDump(buf, 'Test_pum_keep_select_01', {})
|
||||
call term_sendkeys(buf, "\<C-E>\<Esc>")
|
||||
call TermWait(buf, 50)
|
||||
|
||||
call term_sendkeys(buf, "S\<C-X>\<C-P>")
|
||||
call TermWait(buf, 50)
|
||||
call term_sendkeys(buf, "F")
|
||||
call VerifyScreenDump(buf, 'Test_pum_keep_select_02', {})
|
||||
call term_sendkeys(buf, "\<C-E>\<Esc>")
|
||||
|
||||
call TermWait(buf, 50)
|
||||
call StopVimInTerminal(buf)
|
||||
endfunc
|
||||
|
||||
" vim: shiftwidth=2 sts=2 expandtab
|
||||
|
||||
Reference in New Issue
Block a user