Mercurial > vim
diff src/viminfo.c @ 27022:eebbcc83fb75 v8.2.4040
patch 8.2.4040: keeping track of allocated lines is too complicated
Commit: https://github.com/vim/vim/commit/9f1a39a5d1cd7989ada2d1cb32f97d84360e050f
Author: Bram Moolenaar <Bram@vim.org>
Date: Sat Jan 8 15:39:39 2022 +0000
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.
author | Bram Moolenaar <Bram@vim.org> |
---|---|
date | Sat, 08 Jan 2022 16:45:02 +0100 |
parents | ac75c145f0a9 |
children | c9474ae175f4 |
line wrap: on
line diff
--- a/src/viminfo.c +++ b/src/viminfo.c @@ -2730,7 +2730,7 @@ read_viminfo_barline(vir_T *virp, int go { // 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 go 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) {