aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorÖmer Sinan Ağacan <omeragacan@gmail.com>2018-01-21 14:46:54 +0300
committerÖmer Sinan Ağacan <omeragacan@gmail.com>2018-01-26 18:39:20 +0300
commitcd59577d576d71aa788a873ce779ce6dc3e7bc21 (patch)
tree0667454549d9d6ac1161f66b19f10eb2fb7b18cc /src
parent997fc8b13371fac89f8e445275c4aaad2afd37a4 (diff)
downloadrneovim-cd59577d576d71aa788a873ce779ce6dc3e7bc21.tar.gz
rneovim-cd59577d576d71aa788a873ce779ce6dc3e7bc21.tar.bz2
rneovim-cd59577d576d71aa788a873ce779ce6dc3e7bc21.zip
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". https://github.com/vim/vim/commit/a1d5c154dbd5fbe317726bbf2ba99632b91878f4
Diffstat (limited to 'src')
-rw-r--r--src/nvim/ex_getln.c2
-rw-r--r--src/nvim/version.c2
2 files changed, 2 insertions, 2 deletions
diff --git a/src/nvim/ex_getln.c b/src/nvim/ex_getln.c
index 692a8893ae..e396a179a1 100644
--- a/src/nvim/ex_getln.c
+++ b/src/nvim/ex_getln.c
@@ -1076,11 +1076,11 @@ static void command_line_next_incsearch(CommandLineState *s, bool next_match)
s->old_topfill = curwin->w_topfill;
s->old_botline = curwin->w_botline;
update_screen(NOT_VALID);
- restore_last_search_pattern();
redrawcmdline();
} else {
vim_beep(BO_ERROR);
}
+ restore_last_search_pattern();
return;
}
diff --git a/src/nvim/version.c b/src/nvim/version.c
index b6a7150f73..370c8ab5d3 100644
--- a/src/nvim/version.c
+++ b/src/nvim/version.c
@@ -101,7 +101,7 @@ static const int included_patches[] = {
// 1399,
// 1398,
// 1397,
- // 1396,
+ 1396,
// 1395,
// 1394,
// 1393,