Merge pull request #18234 from zeertzjq/cursearch-reduce-redraw

perf: only redraw for CurSearch when it is currently in use
This commit is contained in:
zeertzjq
2022-04-25 10:53:54 +08:00
committed by GitHub
2 changed files with 13 additions and 9 deletions

View File

@@ -6017,3 +6017,9 @@ bool search_was_last_used(void)
{
return last_idx == 0;
}
/// @return true if 'hlsearch' highlight is currently in use.
bool using_hlsearch(void)
{
return spats[last_idx].pat != NULL && p_hls && !no_hlsearch;
}