0
0
mirror of https://github.com/vim/vim.git synced 2025-09-29 04:34:16 -04:00

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.
This commit is contained in:
Bram Moolenaar
2019-01-01 15:15:47 +01:00
parent bbea47075c
commit 6d5b4f566a
2 changed files with 2 additions and 4 deletions

View File

@@ -961,14 +961,10 @@ update_single_line(win_T *wp, linenr_T lnum)
screen_start(); /* not sure of screen cursor */ screen_start(); /* not sure of screen cursor */
# ifdef FEAT_SEARCH_EXTRA # ifdef FEAT_SEARCH_EXTRA
init_search_hl(wp); init_search_hl(wp);
start_search_hl();
prepare_search_hl(wp, lnum); prepare_search_hl(wp, lnum);
# endif # endif
win_line(wp, lnum, row, row + wp->w_lines[j].wl_size, win_line(wp, lnum, row, row + wp->w_lines[j].wl_size,
FALSE, FALSE); FALSE, FALSE);
# if defined(FEAT_SEARCH_EXTRA)
end_search_hl();
# endif
break; break;
} }
row += wp->w_lines[j].wl_size; row += wp->w_lines[j].wl_size;

View File

@@ -799,6 +799,8 @@ static char *(features[]) =
static int included_patches[] = static int included_patches[] =
{ /* Add new patch number below this line */ { /* Add new patch number below this line */
/**/
674,
/**/ /**/
673, 673,
/**/ /**/