summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorBram Moolenaar <Bram@vim.org>2019-03-30 21:19:34 +0100
committerBram Moolenaar <Bram@vim.org>2019-03-30 21:19:34 +0100
commit96428dd4e961332e97d86013a321cedf5fafbed6 (patch)
treef1fd53c2008433b6ecce9066100ac2de9289843b /src
parent372674fca3250069d8f4943b572474ce077849fd (diff)
downloadvim-git-96428dd4e961332e97d86013a321cedf5fafbed6.tar.gz
patch 8.1.1093: support for outdated tags format slows down tag parsingv8.1.1093
Problem: Support for outdated tags format slows down tag parsing. Solution: Remove FEAT_TAG_OLDSTATIC.
Diffstat (limited to 'src')
-rw-r--r--src/feature.h7
-rw-r--r--src/tag.c53
-rw-r--r--src/version.c6
3 files changed, 6 insertions, 60 deletions
diff --git a/src/feature.h b/src/feature.h
index 63b553669..b900569a5 100644
--- a/src/feature.h
+++ b/src/feature.h
@@ -305,12 +305,9 @@
#endif
/*
- * +tag_old_static Old style static tags: "file:tag file ..". Slows
- * down tag searching a bit.
+ * +tag_old_static Old style static tags: "file:tag file ..".
+ * Support was removed in 8.1.1093.
*/
-#ifdef FEAT_NORMAL
-# define FEAT_TAG_OLDSTATIC
-#endif
/*
* +cscope Unix only: Cscope support.
diff --git a/src/tag.c b/src/tag.c
index c5cec8bc0..20473d111 100644
--- 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>...]"
*/
diff --git a/src/version.c b/src/version.c
index 891fece30..6287c79d7 100644
--- a/src/version.c
+++ b/src/version.c
@@ -605,11 +605,7 @@ static char *(features[]) =
#else
"-tag_binary",
#endif
-#ifdef FEAT_TAG_OLDSTATIC
- "+tag_old_static",
-#else
"-tag_old_static",
-#endif
"-tag_any_white",
#ifdef FEAT_TCL
# ifdef DYNAMIC_TCL
@@ -776,6 +772,8 @@ static char *(features[]) =
static int included_patches[] =
{ /* Add new patch number below this line */
/**/
+ 1093,
+/**/
1092,
/**/
1091,