vim-patch:9.1.1657: Autocompletion adds delay

Problem:  Autocompletion adds delay
          (gcanat, char101, after v9.1.1638)
Solution: Temporarily disable autocomplation (Girish Palya).

related: vim/vim#17960
fixes: vim/vim#18022
closes: vim/vim#18048

196c376682

Co-authored-by: Girish Palya <girishji@gmail.com>
This commit is contained in:
zeertzjq
2025-08-23 20:08:01 +08:00
parent 4019d3050d
commit 6ef996a082
4 changed files with 91 additions and 11 deletions

View File

@@ -1417,6 +1417,14 @@ describe('completion', function()
set autocomplete
]])
screen:try_resize(60, 10)
screen:expect([[
^foo |
foobar |
foobarbaz |
{1:~ }|*6
|
]])
screen.timeout = 200
feed('Gof')
screen:expect([[
@@ -1501,6 +1509,57 @@ describe('completion', function()
{5:-- Keyword completion (^N^P) }{6:match 1 of 3} |
]])
-- After the menu is open, ^N/^P and Up/Down should not delay
feed('<Esc>')
command('set completeopt=menu')
feed('Sf')
screen:expect([[
foo |
foobar |
foobarbaz |
f^ |
{1:~ }|*5
{5:-- INSERT --} |
]])
vim.uv.sleep(500)
feed('<C-N>')
screen:expect([[
foo |
foobar |
foobarbaz |
foobarbaz^ |
{12:foobarbaz }{1: }|
{4:foobar }{1: }|
{4:foo }{1: }|
{1:~ }|*2
{5:-- INSERT --} |
]])
feed('<Down>')
screen:expect([[
foo |
foobar |
foobarbaz |
foobarbaz^ |
{4:foobarbaz }{1: }|
{12:foobar }{1: }|
{4:foo }{1: }|
{1:~ }|*2
{5:-- INSERT --} |
]])
-- When menu is not open Up/Down moves cursor to different line
feed('<Esc>Sf')
screen:expect([[
foo |
foobar |
foobarbaz |
f^ |
{1:~ }|*5
{5:-- INSERT --} |
]])
feed('<Down>')
screen:expect_unchanged()
feed('<esc>')
end)
end)