mirror of
https://github.com/neovim/neovim.git
synced 2025-02-25 18:55:25 -06:00
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:
parent
997fc8b133
commit
cd59577d57
@ -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;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -101,7 +101,7 @@ static const int included_patches[] = {
|
|||||||
// 1399,
|
// 1399,
|
||||||
// 1398,
|
// 1398,
|
||||||
// 1397,
|
// 1397,
|
||||||
// 1396,
|
1396,
|
||||||
// 1395,
|
// 1395,
|
||||||
// 1394,
|
// 1394,
|
||||||
// 1393,
|
// 1393,
|
||||||
|
Loading…
Reference in New Issue
Block a user