diff options
author | Bram Moolenaar <Bram@vim.org> | 2017-12-16 19:05:22 +0100 |
---|---|---|
committer | Bram Moolenaar <Bram@vim.org> | 2017-12-16 19:05:22 +0100 |
commit | a1d5c154dbd5fbe317726bbf2ba99632b91878f4 (patch) | |
tree | 62365cb866b7f1a547ae1581d18126815119dcc0 | |
parent | 200d0e36bc5384beb9dc76ac75806ac0aecf84ac (diff) |
patch 8.0.1396: memory leak when CTRL-G in search command line failsv8.0.1396
Problem: Memory leak when CTRL-G in search command line fails.
Solution: Move restore_last_search_pattern to after "if".
-rw-r--r-- | src/ex_getln.c | 2 | ||||
-rw-r--r-- | src/version.c | 2 |
2 files changed, 3 insertions, 1 deletions
diff --git a/src/ex_getln.c b/src/ex_getln.c index 7c553e42e2..405e1f655c 100644 --- a/src/ex_getln.c +++ b/src/ex_getln.c @@ -1810,11 +1810,11 @@ getcmdline( # endif old_botline = curwin->w_botline; update_screen(NOT_VALID); - restore_last_search_pattern(); redrawcmdline(); } else vim_beep(BO_ERROR); + restore_last_search_pattern(); goto cmdline_not_changed; } break; diff --git a/src/version.c b/src/version.c index 0b1733827f..224118a11d 100644 --- a/src/version.c +++ b/src/version.c @@ -772,6 +772,8 @@ static char *(features[]) = static int included_patches[] = { /* Add new patch number below this line */ /**/ + 1396, +/**/ 1395, /**/ 1394, |