mirror of
https://github.com/neovim/neovim.git
synced 2025-11-26 12:10:40 +00:00
Problem: complete_info() returns wrong order of items
(after v9.0.2018)
Solution: Revert Patch v9.0.2018
(Girish Palya)
bug fix: complete_info() gives wrong results
1) complete_info() reverses list of items during <c-p>
2) 'selected' item index is wrong during <c-p>
3) number of items returnd can be wrong
Solution:
- Decouple 'cp_number' from 'selected' index since they need not be
correlated
- Do not iterate the list backwards
- Add targeted tests
Regression introduced by 69fb5afb3b
Following are unnecessary commits to patch problems from above:
fef6630166
daef8c7437
All the tests from above commits are retained though.
fixes: vim/vim#14204
closes: vim/vim#14241
8950bf7f8b
Remove EMPTY_IF_NULL() as it has been unnecessary since #12673.
Co-authored-by: Girish Palya <girishji@gmail.com>