0
0
mirror of https://github.com/vim/vim.git synced 2025-11-10 10:47:23 -05:00

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>
This commit is contained in:
zeertzjq
2024-06-13 17:14:27 +02:00
committed by Christian Brabandt
parent d353d27820
commit 2f95ca9fce
4 changed files with 28 additions and 103 deletions

View File

@@ -463,8 +463,8 @@ pum_screen_put_with_attr(int row, int col, char_u *text, int textlen, int attr)
// 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)
{