diff options
author | Bram Moolenaar <Bram@vim.org> | 2020-05-10 23:11:53 +0200 |
---|---|---|
committer | Bram Moolenaar <Bram@vim.org> | 2020-05-10 23:11:53 +0200 |
commit | 04816717dfea6e2469ff4c9d40f68b59aaf03724 (patch) | |
tree | 4555ac9bf8b4046e7e8c21b59928f5bae1f421f8 /src/scriptfile.c | |
parent | cb2bdb1c6d8b6df4a3d9cfb1ad9e602dace5d310 (diff) | |
download | vim-git-04816717dfea6e2469ff4c9d40f68b59aaf03724.tar.gz |
patch 8.2.0734: Vim9: leaking memory when using :finishv8.2.0734
Problem: Vim9: leaking memory when using :finish.
Solution: Do not check for next line in third pass.
Diffstat (limited to 'src/scriptfile.c')
-rw-r--r-- | src/scriptfile.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/scriptfile.c b/src/scriptfile.c index 86e8b0110..7a148a7c8 100644 --- a/src/scriptfile.c +++ b/src/scriptfile.c @@ -1773,7 +1773,11 @@ getsourceline(int c UNUSED, void *cookie, int indent UNUSED, int do_concat) // Only concatenate lines starting with a \ when 'cpoptions' doesn't // contain the 'C' flag. - if (line != NULL && do_concat && vim_strchr(p_cpo, CPO_CONCAT) == NULL) + if (line != NULL && do_concat && vim_strchr(p_cpo, CPO_CONCAT) == NULL +#ifdef FEAT_EVAL + && sp->use_lines_ga < 0 +#endif + ) { // compensate for the one line read-ahead --sp->sourcing_lnum; |