changeset 4914:1707ddb6f5ae v7.3.1202

updated for version 7.3.1202 Problem: Tags are not found in case-folded tags file. (Darren cole, Issue 90) Solution: Take into account that when case folding was used for the tags file "!rm" sorts before the "!_TAG" header lines.
author Bram Moolenaar <bram@vim.org>
date Sat, 15 Jun 2013 22:26:52 +0200
parents bec828d2e0f5
children d3054ab8d128
files src/tag.c src/version.c
diffstat 2 files changed, 8 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/src/tag.c
+++ b/src/tag.c
@@ -1797,7 +1797,12 @@ line_read_in:
 	     */
 	    if (state == TS_START)
 	    {
-		if (STRNCMP(lbuf, "!_TAG_", 6) == 0)
+		/* The header ends when the line sorts below "!_TAG_".
+		 * There may be non-header items before the header though,
+		 * e.g. "!" itself. When case is folded lower case letters
+		 * sort before "_". */
+		if (STRNCMP(lbuf, "!_TAG_", 6) <= 0
+				|| (lbuf[0] == '!' && ASCII_ISLOWER(lbuf[1])))
 		{
 		    /*
 		     * Read header line.
--- a/src/version.c
+++ b/src/version.c
@@ -729,6 +729,8 @@ static char *(features[]) =
 static int included_patches[] =
 {   /* Add new patch number below this line */
 /**/
+    1202,
+/**/
     1201,
 /**/
     1200,