diff src/window.c @ 16447:54ffc82f38a8 v8.1.1228

patch 8.1.1228: not possible to process tags with a function commit https://github.com/vim/vim/commit/45e18cbdc40afd8144d20dcc07ad2d981636f4c9 Author: Bram Moolenaar <Bram@vim.org> Date: Sun Apr 28 18:05:35 2019 +0200 patch 8.1.1228: not possible to process tags with a function Problem: Not possible to process tags with a function. Solution: Add tagfunc() (Christian Brabandt, Andy Massimino, closes https://github.com/vim/vim/issues/4010)
author Bram Moolenaar <Bram@vim.org>
date Sun, 28 Apr 2019 18:15:07 +0200
parents 8c3a1bd270bb
children 854fb0ad4be6
line wrap: on
line diff
--- a/src/window.c
+++ b/src/window.c
@@ -1326,10 +1326,12 @@ win_init(win_T *newp, win_T *oldp, int f
     /* copy tagstack and folds */
     for (i = 0; i < oldp->w_tagstacklen; i++)
     {
-	newp->w_tagstack[i] = oldp->w_tagstack[i];
-	if (newp->w_tagstack[i].tagname != NULL)
-	    newp->w_tagstack[i].tagname =
-				   vim_strsave(newp->w_tagstack[i].tagname);
+	taggy_T	*tag = &newp->w_tagstack[i];
+	*tag = oldp->w_tagstack[i];
+	if (tag->tagname != NULL)
+	    tag->tagname = vim_strsave(tag->tagname);
+	if (tag->user_data != NULL)
+	    tag->user_data = vim_strsave(tag->user_data);
     }
     newp->w_tagstackidx = oldp->w_tagstackidx;
     newp->w_tagstacklen = oldp->w_tagstacklen;