From 5a0744e44692f810fbaa82e066331ced2ae69855 Mon Sep 17 00:00:00 2001 From: Jan Edmund Lazo Date: Sat, 2 May 2020 16:29:25 -0400 Subject: 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) https://github.com/vim/vim/commit/0b6849e9e302286e906d97e4ba017dd66561a9ce --- src/nvim/screen.c | 1 + 1 file changed, 1 insertion(+) (limited to 'src/nvim/screen.c') diff --git a/src/nvim/screen.c b/src/nvim/screen.c index 45c56549c5..8f8bfee60c 100644 --- a/src/nvim/screen.c +++ b/src/nvim/screen.c @@ -5714,6 +5714,7 @@ void grid_puts_line_flush(bool set_cursor) static void start_search_hl(void) { if (p_hls && !no_hlsearch) { + end_search_hl(); // just in case it wasn't called before last_pat_prog(&search_hl.rm); // Set the time limit to 'redrawtime'. search_hl.tm = profile_setlimit(p_rdt); -- cgit