diff options
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 |
commit | cd59577d576d71aa788a873ce779ce6dc3e7bc21 (patch) | |
tree | 0667454549d9d6ac1161f66b19f10eb2fb7b18cc /src/nvim/ex_getln.c | |
parent | 997fc8b13371fac89f8e445275c4aaad2afd37a4 (diff) | |
download | rneovim-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/nvim/ex_getln.c')
-rw-r--r-- | src/nvim/ex_getln.c | 2 |
1 files changed, 1 insertions, 1 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; } |