diff options
Diffstat (limited to '')
-rw-r--r-- | src/insexpand.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/insexpand.c b/src/insexpand.c index af818d4..d424fff 100644 --- a/src/insexpand.c +++ b/src/insexpand.c @@ -3546,7 +3546,8 @@ static int compare_scores(const void *a, const void *b) int idx_b = *(const int *)b; int score_a = compl_fuzzy_scores[idx_a]; int score_b = compl_fuzzy_scores[idx_b]; - return (score_a > score_b) ? -1 : (score_a < score_b) ? 1 : 0; + return score_a == score_b ? (idx_a == idx_b ? 0 : (idx_a < idx_b ? -1 : 1)) + : (score_a > score_b ? -1 : 1); } /* |