diff src/tag.c @ 16176:4d7ee5609652 v8.1.1093

patch 8.1.1093: support for outdated tags format slows down tag parsing commit https://github.com/vim/vim/commit/96428dd4e961332e97d86013a321cedf5fafbed6 Author: Bram Moolenaar <Bram@vim.org> Date: Sat Mar 30 21:19:34 2019 +0100 patch 8.1.1093: support for outdated tags format slows down tag parsing Problem: Support for outdated tags format slows down tag parsing. Solution: Remove FEAT_TAG_OLDSTATIC.
author Bram Moolenaar <Bram@vim.org>
date Sat, 30 Mar 2019 21:30:04 +0100
parents 213b88f89597
children a8689ea2e869
line wrap: on
line diff
--- a/src/tag.c
+++ b/src/tag.c
@@ -1964,28 +1964,6 @@ parse_line:
 		    break;
 		}
 
-#ifdef FEAT_TAG_OLDSTATIC
-		/*
-		 * Check for old style static tag: "file:tag file .."
-		 */
-		tagp.fname = NULL;
-		for (p = lbuf; p < tagp.tagname_end; ++p)
-		{
-		    if (*p == ':')
-		    {
-			if (tagp.fname == NULL)
-			    tagp.fname = tagp.tagname_end + 1;
-			if (fnamencmp(lbuf, tagp.fname, p - lbuf) == 0
-						&& tagp.fname[p - lbuf] == TAB)
-			{
-			    // found one
-			    tagp.tagname = p + 1;
-			    break;
-			}
-		    }
-		}
-#endif
-
 		/*
 		 * Skip this line if the length of the tag is different and
 		 * there is no regexp, or the tag is too short.
@@ -2098,10 +2076,7 @@ parse_line:
 		/*
 		 * Can be a matching tag, isolate the file name and command.
 		 */
-#ifdef FEAT_TAG_OLDSTATIC
-		if (tagp.fname == NULL)
-#endif
-		    tagp.fname = tagp.tagname_end + 1;
+		tagp.fname = tagp.tagname_end + 1;
 		tagp.fname_end = vim_strchr(tagp.fname, TAB);
 		tagp.command = tagp.fname_end + 1;
 		if (tagp.fname_end == NULL)
@@ -2201,14 +2176,7 @@ parse_line:
 		    is_static = FALSE;
 		    if (!is_etag)	/* emacs tags are never static */
 #endif
-		    {
-#ifdef FEAT_TAG_OLDSTATIC
-			if (tagp.tagname != lbuf)
-			    is_static = TRUE;	/* detected static tag before */
-			else
-#endif
-			    is_static = test_for_static(&tagp);
-		    }
+			is_static = test_for_static(&tagp);
 
 		    /* decide in which of the sixteen tables to store this
 		     * match */
@@ -2870,23 +2838,6 @@ test_for_static(tagptrs_T *tagp)
 {
     char_u	*p;
 
-#ifdef FEAT_TAG_OLDSTATIC
-    int		len;
-
-    /*
-     * Check for old style static tag: "file:tag file .."
-     */
-    len = (int)(tagp->fname_end - tagp->fname);
-    p = tagp->tagname + len;
-    if (       p < tagp->tagname_end
-	    && *p == ':'
-	    && fnamencmp(tagp->tagname, tagp->fname, len) == 0)
-    {
-	tagp->tagname = p + 1;
-	return TRUE;
-    }
-#endif
-
     /*
      * Check for new style static tag ":...<Tab>file:[<Tab>...]"
      */