]> git.ipfire.org Git - thirdparty/vim.git/commitdiff
patch 9.1.2116: crash when using 'tagfunc' v9.1.2116
authorYasuhiro Matsumoto <mattn.jp@gmail.com>
Fri, 30 Jan 2026 09:45:55 +0000 (09:45 +0000)
committerChristian Brabandt <cb@256bit.org>
Fri, 30 Jan 2026 09:45:55 +0000 (09:45 +0000)
Problem:  crash when using 'tagfunc' (Rodrigo Queipo)
Solution: Do not add the user_data to the 'info' dictionary when called
          for insert mode completion (the TAG_INS_COMP flag is set).
          Completion should not depend on the state of a previous tag
          jump. (Yasuhiro Matsumoto)

fixes:  #19255
closes: #19284

Signed-off-by: Yasuhiro Matsumoto <mattn.jp@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
src/tag.c
src/version.c

index b2ecb565619c7d459a1d9d74d8e561d668f01f5a..07890943f1ea266f67a8b78a38eb03b5a2d23622 100644 (file)
--- a/src/tag.c
+++ b/src/tag.c
@@ -1460,7 +1460,7 @@ find_tagfunc_tags(
     // create 'info' dict argument
     if ((d = dict_alloc_lock(VAR_FIXED)) == NULL)
        return FAIL;
-    if (tag->user_data != NULL)
+    if (!(flags & TAG_INS_COMP) && tag->user_data != NULL)
        dict_add_string(d, "user_data", tag->user_data);
     if (buf_ffname != NULL)
        dict_add_string(d, "buf_ffname", buf_ffname);
index 2644380c007d434942fb1678e3cb5e9375c18a0b..30f37349d3f18ef9316b53deccae61d7eeb93007 100644 (file)
@@ -734,6 +734,8 @@ static char *(features[]) =
 
 static int included_patches[] =
 {   /* Add new patch number below this line */
+/**/
+    2116,
 /**/
     2115,
 /**/