0
0
mirror of https://github.com/vim/vim.git synced 2025-09-24 03:44:06 -04:00

patch 8.2.4040: keeping track of allocated lines is too complicated

Problem:    Keeping track of allocated lines in user functions is too
            complicated.
Solution:   Instead of freeing individual lines keep them all until the end.
This commit is contained in:
Bram Moolenaar
2022-01-08 15:39:39 +00:00
parent 67ffb41786
commit 9f1a39a5d1
10 changed files with 82 additions and 47 deletions

View File

@@ -2730,7 +2730,7 @@ read_viminfo_barline(vir_T *virp, int got_encoding, int force, int writing)
{
// Continuation line of an unrecognized item.
if (writing)
ga_add_string(&virp->vir_barlines, virp->vir_line);
ga_copy_string(&virp->vir_barlines, virp->vir_line);
}
else
{
@@ -2769,7 +2769,7 @@ read_viminfo_barline(vir_T *virp, int got_encoding, int force, int writing)
default:
// copy unrecognized line (for future use)
if (writing)
ga_add_string(&virp->vir_barlines, virp->vir_line);
ga_copy_string(&virp->vir_barlines, virp->vir_line);
}
for (i = 0; i < values.ga_len; ++i)
{