Mercurial > vim
comparison src/screen.c @ 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 | f2e4c12b24b3 |
children | b6a0237e8478 |
comparison
equal
deleted
inserted
replaced
20250:b794fa2c0436 | 20251:9620ab71f4f3 |
---|---|
1716 void | 1716 void |
1717 start_search_hl(void) | 1717 start_search_hl(void) |
1718 { | 1718 { |
1719 if (p_hls && !no_hlsearch) | 1719 if (p_hls && !no_hlsearch) |
1720 { | 1720 { |
1721 end_search_hl(); // just in case it wasn't called before | |
1721 last_pat_prog(&screen_search_hl.rm); | 1722 last_pat_prog(&screen_search_hl.rm); |
1722 screen_search_hl.attr = HL_ATTR(HLF_L); | 1723 screen_search_hl.attr = HL_ATTR(HLF_L); |
1723 # ifdef FEAT_RELTIME | 1724 # ifdef FEAT_RELTIME |
1724 // Set the time limit to 'redrawtime'. | 1725 // Set the time limit to 'redrawtime'. |
1725 profile_setlimit(p_rdt, &screen_search_hl.tm); | 1726 profile_setlimit(p_rdt, &screen_search_hl.tm); |