diff options
| author | zeertzjq <zeertzjq@outlook.com> | 2025-06-23 07:56:47 +0800 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2025-06-23 07:56:47 +0800 |
| commit | 534ec8d44725cda91c577afa760d01c004bd394d (patch) | |
| tree | b88bb48a45262fcc3afb198efb7c6b8157267cd5 /src | |
| parent | 30f650420bad59dd21f76d92eeac798b1e631874 (diff) | |
| download | rneovim-534ec8d44725cda91c577afa760d01c004bd394d.tar.gz rneovim-534ec8d44725cda91c577afa760d01c004bd394d.tar.bz2 rneovim-534ec8d44725cda91c577afa760d01c004bd394d.zip | |
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
https://github.com/vim/vim/commit/cd68f21f6066778487a1cad30dd1e021debb7e78
Co-authored-by: Girish Palya <girishji@gmail.com>
Diffstat (limited to 'src')
| -rw-r--r-- | src/nvim/insexpand.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/nvim/insexpand.c b/src/nvim/insexpand.c index 7167033e0d..7b71467a22 100644 --- a/src/nvim/insexpand.c +++ b/src/nvim/insexpand.c @@ -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; |