mirror of
https://github.com/vim/vim.git
synced 2025-07-25 10:54:51 -04:00
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".
This commit is contained in:
parent
200d0e36bc
commit
a1d5c154db
@ -1810,11 +1810,11 @@ getcmdline(
|
|||||||
# endif
|
# endif
|
||||||
old_botline = curwin->w_botline;
|
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();
|
||||||
goto cmdline_not_changed;
|
goto cmdline_not_changed;
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
@ -771,6 +771,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 */
|
||||||
|
/**/
|
||||||
|
1396,
|
||||||
/**/
|
/**/
|
||||||
1395,
|
1395,
|
||||||
/**/
|
/**/
|
||||||
|
Loading…
x
Reference in New Issue
Block a user