mirror of
https://github.com/neovim/neovim.git
synced 2025-02-25 18:55:25 -06:00
vim-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 vim/vim#6028)
0b6849e9e3
This commit is contained in:
parent
bc29283f20
commit
5a0744e446
@ -5714,6 +5714,7 @@ void grid_puts_line_flush(bool set_cursor)
|
|||||||
static void start_search_hl(void)
|
static void start_search_hl(void)
|
||||||
{
|
{
|
||||||
if (p_hls && !no_hlsearch) {
|
if (p_hls && !no_hlsearch) {
|
||||||
|
end_search_hl(); // just in case it wasn't called before
|
||||||
last_pat_prog(&search_hl.rm);
|
last_pat_prog(&search_hl.rm);
|
||||||
// Set the time limit to 'redrawtime'.
|
// Set the time limit to 'redrawtime'.
|
||||||
search_hl.tm = profile_setlimit(p_rdt);
|
search_hl.tm = profile_setlimit(p_rdt);
|
||||||
|
Loading…
Reference in New Issue
Block a user