]> granicus.if.org Git - vim/commitdiff
updated for version 7.2.335 v7.2.335
authorBram Moolenaar <Bram@vim.org>
Tue, 19 Jan 2010 14:24:27 +0000 (15:24 +0100)
committerBram Moolenaar <Bram@vim.org>
Tue, 19 Jan 2010 14:24:27 +0000 (15:24 +0100)
Problem:    The CTRL-] command escapes too many characters.
Solution:   Use a different list of characters to be escaped. (Sergey Khorev)

src/normal.c
src/version.c

index 0c2325d931f0f97e9a497c16f24b2911f89ec9bb..fade0fc3f734ca7b438a414c2e570494ca6f3805 100644 (file)
@@ -5406,6 +5406,7 @@ nv_ident(cap)
     int                n = 0;          /* init for GCC */
     int                cmdchar;
     int                g_cmd;          /* "g" command */
+    int                tag_cmd = FALSE;
     char_u     *aux_ptr;
     int                isman;
     int                isman_s;
@@ -5515,6 +5516,7 @@ nv_ident(cap)
            break;
 
        case ']':
+           tag_cmd = TRUE;
 #ifdef FEAT_CSCOPE
            if (p_cst)
                STRCPY(buf, "cstag ");
@@ -5526,10 +5528,14 @@ nv_ident(cap)
        default:
            if (curbuf->b_help)
                STRCPY(buf, "he! ");
-           else if (g_cmd)
-               STRCPY(buf, "tj ");
            else
-               sprintf((char *)buf, "%ldta ", cap->count0);
+           {
+               tag_cmd = TRUE;
+               if (g_cmd)
+                   STRCPY(buf, "tj ");
+               else
+                   sprintf((char *)buf, "%ldta ", cap->count0);
+           }
     }
 
     /*
@@ -5562,8 +5568,10 @@ nv_ident(cap)
            aux_ptr = (char_u *)(p_magic ? "/.*~[^$\\" : "/^$\\");
        else if (cmdchar == '#')
            aux_ptr = (char_u *)(p_magic ? "/?.*~[^$\\" : "/?^$\\");
-       else
+       else if (tag_cmd)
            /* Don't escape spaces and Tabs in a tag with a backslash */
+           aux_ptr = (char_u *)"\\|\"\n[";
+       else
            aux_ptr = (char_u *)"\\|\"\n*?[";
 
        p = buf + STRLEN(buf);
index 0c18e187623e1d377e186de486eb5e6f02f6d0e5..0b29cb70937cbff1fb6b0a38051342bae91d24d2 100644 (file)
@@ -681,6 +681,8 @@ static char *(features[]) =
 
 static int included_patches[] =
 {   /* Add new patch number below this line */
+/**/
+    335,
 /**/
     334,
 /**/