mirror of
https://github.com/neovim/neovim.git
synced 2025-09-17 16:58:17 +00:00
vim-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)
9f573a8df0
This commit is contained in:
@@ -4981,8 +4981,7 @@ static win_T *win_alloc(win_T *after, bool hidden)
|
||||
|
||||
foldInitWin(new_wp);
|
||||
unblock_autocmds();
|
||||
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
|
||||
return new_wp;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user