mirror of
https://github.com/neovim/neovim.git
synced 2026-01-30 17:11:11 +10:00
vim-patch:9.1.1475: completion: regression when "nearest" in 'completeopt' (#34607)
Problem: completion: regression when "nearest" in 'completeopt'
Solution: fix compare function (Girish Palya)
closes: vim/vim#17577
cd68f21f60
Co-authored-by: Girish Palya <girishji@gmail.com>
This commit is contained in:
@@ -1330,7 +1330,7 @@ static int cp_compare_nearest(const void *a, const void *b)
|
||||
{
|
||||
int score_a = ((compl_T *)a)->cp_score;
|
||||
int score_b = ((compl_T *)b)->cp_score;
|
||||
if (score_a < 0 || score_b < 0) {
|
||||
if (score_a == 0 || score_b == 0) {
|
||||
return 0;
|
||||
}
|
||||
return (score_a > score_b) ? 1 : (score_a < score_b) ? -1 : 0;
|
||||
|
||||
Reference in New Issue
Block a user