diff options
author | zeertzjq <zeertzjq@outlook.com> | 2024-06-14 20:04:42 +0200 |
---|---|---|
committer | Christian Brabandt <cb@256bit.org> | 2024-06-14 20:04:42 +0200 |
commit | 8e56747fd26b3b040b6fcbfb6be41b7d5922c6b5 (patch) | |
tree | db8335d4996d96535286f9183d39f7fa68d181a0 /src/structs.h | |
parent | 440746158ce0fec2880ccacc03f39dbc954c5543 (diff) |
patch 9.1.0484: Sorting of completeopt+=fuzzy is not stablev9.1.0484
Problem: Sorting of completeopt+=fuzzy is not stable.
Solution: Compare original indexes when scores are the same.
(zeertzjq)
closes: #14988
Signed-off-by: zeertzjq <zeertzjq@outlook.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
Diffstat (limited to 'src/structs.h')
-rw-r--r-- | src/structs.h | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/structs.h b/src/structs.h index f1bbf1735d..7e21f0fc8b 100644 --- a/src/structs.h +++ b/src/structs.h @@ -4470,7 +4470,8 @@ typedef struct char_u *pum_kind; // extra kind text (may be truncated) char_u *pum_extra; // extra menu text (may be truncated) char_u *pum_info; // extra info - int pum_score; // fuzzy match score + int pum_score; // fuzzy match score + int pum_idx; // index of item before sorting by score } pumitem_T; /* |