mirror of
https://github.com/neovim/neovim.git
synced 2025-09-30 15:08:35 +00:00
vim-patch:9.1.1771: complete: some redraw issues with 'autocomplete'
Problem: complete: some redraw issues with 'autocomplete'
Solution: Fix the issues (Girish Palya)
This commit contains the following changes:
* Fix that wildtrigger() might leave opened popupmenu around vim/vim#18298
* Remove blinking message on the command line when a menu item from a loaded
buffer is selected during 'autocomplete'
* Add a test for PR vim/vim#18265 to demonstrate why the PR is required for correct
'autocomplete' behavior
fixes: vim/vim#18298
closes: vim/vim#18328
ee9a2f0512
Co-authored-by: Girish Palya <girishji@gmail.com>
This commit is contained in:
@@ -5359,7 +5359,7 @@ func Test_autocomplete_trigger()
|
||||
call feedkeys("Sazx\<Left>\<BS>\<F2>\<Esc>0", 'tx!')
|
||||
call assert_equal(['and', 'afoo'], b:matches->mapnew('v:val.word'))
|
||||
|
||||
" Test 6: <BS> should clear the selected item
|
||||
" Test 6: <BS> should clear the selected item (PR #18265)
|
||||
%d
|
||||
call setline(1, ["foobarfoo", "foobar", "foobarbaz"])
|
||||
call feedkeys("Gofo\<C-N>\<C-N>\<F2>\<F3>\<Esc>0", 'tx!')
|
||||
@@ -5374,6 +5374,13 @@ func Test_autocomplete_trigger()
|
||||
call assert_equal(0, b:selected)
|
||||
call assert_equal('foobarbaz', getline(4))
|
||||
|
||||
" Test 7: Remove selection when menu contents change (PR #18265)
|
||||
%d
|
||||
call setline(1, ["foobar", "fodxyz", "fodabc"])
|
||||
call feedkeys("Gofoo\<C-N>\<BS>\<BS>\<BS>\<BS>d\<F2>\<F3>\<Esc>0", 'tx!')
|
||||
call assert_equal(['fodabc', 'fodxyz'], b:matches->mapnew('v:val.word'))
|
||||
call assert_equal(-1, b:selected)
|
||||
|
||||
bw!
|
||||
call Ntest_override("char_avail", 0)
|
||||
delfunc NonKeywordComplete
|
||||
|
Reference in New Issue
Block a user