diff options
author | glepnir <glephunter@gmail.com> | 2024-11-30 18:24:31 +0800 |
---|---|---|
committer | glepnir <glephunter@gmail.com> | 2024-11-30 20:22:53 +0800 |
commit | 1af1e918d30c062dfcb7d4ce2f4cfbca1d11e2ab (patch) | |
tree | 388fa541dd330e0ee004d34ea991434c55104d18 /test | |
parent | d512479115296a2df246ef7afbfa55f057fecae2 (diff) | |
download | rneovim-1af1e918d30c062dfcb7d4ce2f4cfbca1d11e2ab.tar.gz rneovim-1af1e918d30c062dfcb7d4ce2f4cfbca1d11e2ab.tar.bz2 rneovim-1af1e918d30c062dfcb7d4ce2f4cfbca1d11e2ab.zip |
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
https://github.com/vim/vim/commit/a49c077a883b2566882df9069385ed1e1277ca64
Diffstat (limited to 'test')
-rw-r--r-- | test/old/testdir/test_popup.vim | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/test/old/testdir/test_popup.vim b/test/old/testdir/test_popup.vim index 601ba6c688..33e86678c8 100644 --- a/test/old/testdir/test_popup.vim +++ b/test/old/testdir/test_popup.vim @@ -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 |