0
0
mirror of https://github.com/vim/vim.git synced 2025-10-26 09:14:23 -04:00

patch 9.1.1657: Autocompletion adds delay

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

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

Signed-off-by: Girish Palya <girishji@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
This commit is contained in:
Girish Palya
2025-08-20 21:15:06 +02:00
committed by Christian Brabandt
parent 84a343a6ed
commit 196c376682
8 changed files with 66 additions and 14 deletions

View File

@@ -0,0 +1,10 @@
|f+0&#ffffff0|o@1| @71
|f|o@1|b|a|r| @68
|f|o@1|b|a|r|b|a|z| @65
|f> @73
|~+0#4040ff13&| @73
|~| @73
|~| @73
|~| @73
|~| @73
|-+2#0000000&@1| |I|N|S|E|R|T| |-@1| +0&&@62

View File

@@ -0,0 +1,10 @@
|f+0&#ffffff0|o@1| @71
|f|o@1|b|a|r| @68
|f|o@1|b|a|r|b|a|z| @65
|f|o@1|b|a|r|b|a|z> @65
|f+0#0000001#e0e0e08|o@1|b|a|r|b|a|z| @5| +0#4040ff13#ffffff0@59
|f+0#0000001#ffd7ff255|o@1|b|a|r| @8| +0#4040ff13#ffffff0@59
|f+0#0000001#ffd7ff255|o@1| @11| +0#4040ff13#ffffff0@59
|~| @73
|~| @73
|-+2#0000000&@1| |I|N|S|E|R|T| |-@1| +0&&@62

View File

@@ -0,0 +1,10 @@
|f+0&#ffffff0|o@1| @71
|f|o@1|b|a|r| @68
|f|o@1|b|a|r|b|a|z| @65
|f|o@1|b|a|r|b|a|z> @65
|f+0#0000001#ffd7ff255|o@1|b|a|r|b|a|z| @5| +0#4040ff13#ffffff0@59
|f+0#0000001#e0e0e08|o@1|b|a|r| @8| +0#4040ff13#ffffff0@59
|f+0#0000001#ffd7ff255|o@1| @11| +0#4040ff13#ffffff0@59
|~| @73
|~| @73
|-+2#0000000&@1| |I|N|S|E|R|T| |-@1| +0&&@62

View File

@@ -5358,7 +5358,7 @@ func Test_autocomplete_timer()
call assert_equal(['abc', 'ab'], b:matches->mapnew('v:val.word'))
call assert_equal(0, b:selected)
call assert_equal(1, g:CallCount)
call assert_equal('abc', getline(4))
call assert_equal('ab', getline(4))
set completeopt&
" Test 8: {func} completes after space, but not '.'
@@ -5490,6 +5490,20 @@ func Test_autocompletedelay()
call term_sendkeys(buf, "Sf\<C-N>")
call VerifyScreenDump(buf, 'Test_autocompletedelay_7', {})
" After the menu is open, ^N/^P and Up/Down should not delay
call term_sendkeys(buf, "\<Esc>:set completeopt=menu noruler\<CR>")
call term_sendkeys(buf, "\<Esc>Sf")
sleep 500ms
call term_sendkeys(buf, "\<C-N>")
call VerifyScreenDump(buf, 'Test_autocompletedelay_8', {})
call term_sendkeys(buf, "\<Down>")
call VerifyScreenDump(buf, 'Test_autocompletedelay_9', {})
" When menu is not open Up/Down moves cursor to different line
call term_sendkeys(buf, "\<Esc>Sf")
call term_sendkeys(buf, "\<Down>")
call VerifyScreenDump(buf, 'Test_autocompletedelay_10', {})
call term_sendkeys(buf, "\<esc>")
call StopVimInTerminal(buf)
endfunc