From 40f7ce96c32f1e19a1b432ac8f938673f917f72b Mon Sep 17 00:00:00 2001 From: Jan Edmund Lazo Date: Sat, 5 Jan 2019 09:43:02 -0500 Subject: [PATCH] vim-patch:8.1.0674: leaking memory when updating a single line Problem: Leaking memory when updating a single line. Solution: Do not call start_search_hl() twice. https://github.com/vim/vim/commit/6d5b4f566a2a50c1de7300336e9e4f5e761500a8 --- src/nvim/screen.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/src/nvim/screen.c b/src/nvim/screen.c index f6e082f92e..528a14e83c 100644 --- a/src/nvim/screen.c +++ b/src/nvim/screen.c @@ -550,13 +550,11 @@ void update_single_line(win_T *wp, linenr_T lnum) for (j = 0; j < wp->w_lines_valid; ++j) { if (lnum == wp->w_lines[j].wl_lnum) { init_search_hl(wp); - start_search_hl(); prepare_search_hl(wp, lnum); update_window_hl(wp, false); // allocate window grid if not already win_grid_alloc(wp); win_line(wp, lnum, row, row + wp->w_lines[j].wl_size, false, false); - end_search_hl(); break; } row += wp->w_lines[j].wl_size;