vim-patch:8.0.1396: memory leak when CTRL-G in search command line fails

Problem:    Memory leak when CTRL-G in search command line fails.
Solution:   Move restore_last_search_pattern to after "if".

a1d5c154db
This commit is contained in:
Ömer Sinan Ağacan 2018-01-21 14:46:54 +03:00
parent 997fc8b133
commit cd59577d57
2 changed files with 2 additions and 2 deletions

View File

@ -1076,11 +1076,11 @@ static void command_line_next_incsearch(CommandLineState *s, bool next_match)
s->old_topfill = curwin->w_topfill; s->old_topfill = curwin->w_topfill;
s->old_botline = curwin->w_botline; s->old_botline = curwin->w_botline;
update_screen(NOT_VALID); update_screen(NOT_VALID);
restore_last_search_pattern();
redrawcmdline(); redrawcmdline();
} else { } else {
vim_beep(BO_ERROR); vim_beep(BO_ERROR);
} }
restore_last_search_pattern();
return; return;
} }

View File

@ -101,7 +101,7 @@ static const int included_patches[] = {
// 1399, // 1399,
// 1398, // 1398,
// 1397, // 1397,
// 1396, 1396,
// 1395, // 1395,
// 1394, // 1394,
// 1393, // 1393,