mirror of
https://github.com/vim/vim.git
synced 2025-09-29 04:34:16 -04:00
patch 9.0.0622: matchaddpos() can get slow when adding many matches
Problem: matchaddpos() can get slow when adding many matches. Solution: Update the next available match ID when manually picking an ID and remove check if the available ID can be used. (idea by Rick Howe)
This commit is contained in:
@@ -5143,8 +5143,7 @@ win_alloc(win_T *after UNUSED, int hidden UNUSED)
|
||||
#endif
|
||||
unblock_autocmds();
|
||||
#ifdef FEAT_SEARCH_EXTRA
|
||||
new_wp->w_match_head = NULL;
|
||||
new_wp->w_next_match_id = 4;
|
||||
new_wp->w_next_match_id = 1000; // up to 1000 can be picked by the user
|
||||
#endif
|
||||
return new_wp;
|
||||
}
|
||||
|
Reference in New Issue
Block a user