vim-patch:9.1.1800: completion: strange behaviour with 'ac' completeopt=longest,preinsert

Problem:  completion: strange behaviour with 'ac'
          completeopt=longest,preinsert (zeertzjq)
Solution: Let preinsert take precedence (Girish Palya)

fixes: vim/vim#18410
closes: vim/vim#18428

d35e5e4237

Co-authored-by: Girish Palya <girishji@gmail.com>
This commit is contained in:
zeertzjq
2025-09-30 09:06:09 +08:00
parent e6b2255ac7
commit f30a33858f
3 changed files with 16 additions and 5 deletions

View File

@@ -1496,18 +1496,18 @@ describe('completion', function()
-- During delay wait, user can open menu using CTRL_N completion
feed('<Esc>')
command('set completeopt=menuone,longest')
command('set completeopt=menuone')
feed('Sf<C-N>')
screen:expect([[
foo |
foobar |
foobarbaz |
foo^ |
{4:foo }{1: }|
{12:foo }{1: }|
{4:foobar }{1: }|
{4:foobarbaz }{1: }|
{1:~ }|*2
{5:-- Keyword completion (^N^P) }{19:Back at original} |
{5:-- Keyword completion (^N^P) }{6:match 1 of 3} |
]])
-- After the menu is open, ^N/^P and Up/Down should not delay