summaryrefslogtreecommitdiff
path: root/src/screen.c
diff options
context:
space:
mode:
authorBram Moolenaar <Bram@vim.org>2020-05-02 18:33:25 +0200
committerBram Moolenaar <Bram@vim.org>2020-05-02 18:33:25 +0200
commit0b6849e9e302286e906d97e4ba017dd66561a9ce (patch)
tree066fa3d155771c555ac9fe8588019f098e16c4ef /src/screen.c
parent01f731e97c92bee05927f5008b7cd34ce188632b (diff)
downloadvim-git-0b6849e9e302286e906d97e4ba017dd66561a9ce.tar.gz
patch 8.2.0681: pattern for 'hlsearch' highlighting may leakv8.2.0681
Problem: Pattern for 'hlsearch' highlighting may leak. (Dominique Pelle) Solution: Call end_search_hl() to make sure the previous pattern is freed. (closes #6028)
Diffstat (limited to 'src/screen.c')
-rw-r--r--src/screen.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/screen.c b/src/screen.c
index 09aa10f0b..e218196fd 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