From 0b6849e9e302286e906d97e4ba017dd66561a9ce Mon Sep 17 00:00:00 2001 From: Bram Moolenaar Date: Sat, 2 May 2020 18:33:25 +0200 Subject: [PATCH] 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) --- src/screen.c | 1 + src/version.c | 2 ++ 2 files changed, 3 insertions(+) diff --git a/src/screen.c b/src/screen.c index 09aa10f0bc..e218196fd7 100644 --- a/src/screen.c +++ b/src/screen.c @@ -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 diff --git a/src/version.c b/src/version.c index 02f7b6ef6d..982ac1f887 100644 --- a/src/version.c +++ b/src/version.c @@ -746,6 +746,8 @@ static char *(features[]) = static int included_patches[] = { /* Add new patch number below this line */ +/**/ + 681, /**/ 680, /**/ -- 2.47.3