]> granicus.if.org Git - vim/commitdiff
patch 8.2.0734: Vim9: leaking memory when using :finish v8.2.0734
authorBram Moolenaar <Bram@vim.org>
Sun, 10 May 2020 21:11:53 +0000 (23:11 +0200)
committerBram Moolenaar <Bram@vim.org>
Sun, 10 May 2020 21:11:53 +0000 (23:11 +0200)
Problem:    Vim9: leaking memory when using :finish.
Solution:   Do not check for next line in third pass.

src/scriptfile.c
src/version.c

index 86e8b01105b3ec3bd4583e5fbfd2bbb4a2c71e28..7a148a7c8ae4ea07343b0a8b817286d285338b77 100644 (file)
@@ -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;
index 9dc3c22e53e10a37f72118a4151ab95ed2c012b4..19920dea8762121d325e4409a0acbd11690cf7e0 100644 (file)
@@ -746,6 +746,8 @@ static char *(features[]) =
 
 static int included_patches[] =
 {   /* Add new patch number below this line */
+/**/
+    734,
 /**/
     733,
 /**/