patch 9.1.0479: fuzzy_match_str_with_pos() does unnecessary list operations
Problem: fuzzy_match_str_with_pos() does unnecessary list operations.
Solution: Use fuzzy_match() directly (zeertzjq).
closes: #14987
Signed-off-by: zeertzjq <zeertzjq@outlook.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
diff --git a/src/popupmenu.c b/src/popupmenu.c
index 00b0006..dd1a6ec 100644
--- a/src/popupmenu.c
+++ b/src/popupmenu.c
@@ -463,8 +463,8 @@
// Handle fuzzy matching
for (i = 0; i < ga->ga_len; i++)
{
- int *match_pos = ((int *)ga->ga_data) + i;
- int actual_char_pos = 0;
+ int_u *match_pos = ((int_u *)ga->ga_data) + i;
+ int_u actual_char_pos = 0;
char_u *temp_ptr = text;
while (temp_ptr < ptr)
{