# HG changeset patch # User Christian Brabandt # Date 1707568204 -3600 # Node ID 59d706a161a40aee12df67f1b6a20a3a8afea404 # Parent c3754d739059be4df09ba35e17a0972dc2098fa4 patch 9.1.0093: Still a qsort() comparison function that returns result of subtraction Commit: https://github.com/vim/vim/commit/77078276bfe695070441a1bbdc02949d31de8922 Author: zeertzjq Date: Sat Feb 10 13:24:03 2024 +0100 patch 9.1.0093: Still a qsort() comparison function that returns result of subtraction Problem: Still a qsort() comparison function fuzzy_match_item_compare() that returns result of subtraction (after 9.1.0089). Solution: Use an explicit comparison instead of subtraction. (zeertzjq) closes: #14004 Signed-off-by: zeertzjq Signed-off-by: Christian Brabandt diff --git a/src/search.c b/src/search.c --- a/src/search.c +++ b/src/search.c @@ -4561,7 +4561,10 @@ fuzzy_match_item_compare(const void *s1, int idx1 = ((fuzzyItem_T *)s1)->idx; int idx2 = ((fuzzyItem_T *)s2)->idx; - return v1 == v2 ? (idx1 - idx2) : v1 > v2 ? -1 : 1; + if (v1 == v2) + return idx1 == idx2 ? 0 : idx1 > idx2 ? 1 : -1; + else + return v1 > v2 ? -1 : 1; } /* diff --git a/src/version.c b/src/version.c --- a/src/version.c +++ b/src/version.c @@ -705,6 +705,8 @@ static char *(features[]) = static int included_patches[] = { /* Add new patch number below this line */ /**/ + 93, +/**/ 92, /**/ 91,