changeset 20251:9620ab71f4f3 v8.2.0681

patch 8.2.0681: pattern for 'hlsearch' highlighting may leak Commit: https://github.com/vim/vim/commit/0b6849e9e302286e906d97e4ba017dd66561a9ce Author: Bram Moolenaar <Bram@vim.org> Date: Sat May 2 18:33:25 2020 +0200 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)
author Bram Moolenaar <Bram@vim.org>
date Sat, 02 May 2020 18:45:06 +0200
parents b794fa2c0436
children b5a5cffac014
files src/screen.c src/version.c
diffstat 2 files changed, 3 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- 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
--- a/src/version.c
+++ b/src/version.c
@@ -747,6 +747,8 @@ static char *(features[]) =
 static int included_patches[] =
 {   /* Add new patch number below this line */
 /**/
+    681,
+/**/
     680,
 /**/
     679,