0
0
mirror of https://github.com/vim/vim.git synced 2025-10-01 04:54:07 -04:00

patch 8.2.0681: pattern for 'hlsearch' highlighting may leak

Problem:    Pattern for 'hlsearch' highlighting may leak. (Dominique Pelle)
Solution:   Call end_search_hl() to make sure the previous pattern is freed.
            (closes #6028)
This commit is contained in:
Bram Moolenaar
2020-05-02 18:33:25 +02:00
parent 01f731e97c
commit 0b6849e9e3
2 changed files with 3 additions and 0 deletions

View File

@@ -1718,6 +1718,7 @@ start_search_hl(void)
{
if (p_hls && !no_hlsearch)
{
end_search_hl(); // just in case it wasn't called before
last_pat_prog(&screen_search_hl.rm);
screen_search_hl.attr = HL_ATTR(HLF_L);
# ifdef FEAT_RELTIME