aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJan Edmund Lazo <jan.lazo@mail.utoronto.ca>2020-05-02 16:29:25 -0400
committerJan Edmund Lazo <jan.lazo@mail.utoronto.ca>2020-05-03 13:16:38 -0400
commit5a0744e44692f810fbaa82e066331ced2ae69855 (patch)
tree6120152c1b4eccb0ef4dd80a239a40a68bec07e9
parentbc29283f209db7a7de3c999af2780c3d5a30ebae (diff)
downloadrneovim-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.c1
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);