diff options
author | Jan Edmund Lazo <jan.lazo@mail.utoronto.ca> | 2020-05-02 16:29:25 -0400 |
---|---|---|
committer | Jan Edmund Lazo <jan.lazo@mail.utoronto.ca> | 2020-05-03 13:16:38 -0400 |
commit | 5a0744e44692f810fbaa82e066331ced2ae69855 (patch) | |
tree | 6120152c1b4eccb0ef4dd80a239a40a68bec07e9 | |
parent | bc29283f209db7a7de3c999af2780c3d5a30ebae (diff) | |
download | rneovim-5a0744e44692f810fbaa82e066331ced2ae69855.tar.gz rneovim-5a0744e44692f810fbaa82e066331ced2ae69855.tar.bz2 rneovim-5a0744e44692f810fbaa82e066331ced2ae69855.zip |
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
-rw-r--r-- | src/nvim/screen.c | 1 |
1 files changed, 1 insertions, 0 deletions
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); |