vim-patch:9.1.1185: endless loop with completefuzzycollect and no match found

Problem:  endless loop with completefuzzycollect and no match found
Solution: move pointer to line end and break loop

closes: vim/vim#16820

dd42b05f8a

Co-authored-by: glepnir <glephunter@gmail.com>
This commit is contained in:
zeertzjq
2025-03-09 06:23:25 +08:00
parent 10fde593f1
commit cd95ea5d48
3 changed files with 13 additions and 6 deletions

View File

@@ -3038,6 +3038,11 @@ func Test_cfc_with_longest()
call writefile([' auto int enum register', 'why'], 'test_case4.txt', 'D')
exe "normal ggdGSe\<C-N>\<C-N>\<ESC>"
call assert_equal("enum", getline('.'))
set complete=ktest_case5.txt
call writefile(['hello friends', 'go', 'hero'], 'test_case5.txt', 'D')
exe "normal ggdGSh\<C-N>\<C-N>\<ESC>"
call assert_equal("hero", getline('.'))
set complete&
" file