0
0
mirror of https://github.com/vim/vim.git synced 2025-09-27 04:14:06 -04:00

updated for version 7.2.335

Problem:    The CTRL-] command escapes too many characters.
Solution:   Use a different list of characters to be escaped. (Sergey Khorev)
This commit is contained in:
Bram Moolenaar
2010-01-19 15:24:27 +01:00
parent 8065d7fd9c
commit 6d8027a6c2
2 changed files with 14 additions and 4 deletions

View File

@@ -5406,6 +5406,7 @@ nv_ident(cap)
int n = 0; /* init for GCC */ int n = 0; /* init for GCC */
int cmdchar; int cmdchar;
int g_cmd; /* "g" command */ int g_cmd; /* "g" command */
int tag_cmd = FALSE;
char_u *aux_ptr; char_u *aux_ptr;
int isman; int isman;
int isman_s; int isman_s;
@@ -5515,6 +5516,7 @@ nv_ident(cap)
break; break;
case ']': case ']':
tag_cmd = TRUE;
#ifdef FEAT_CSCOPE #ifdef FEAT_CSCOPE
if (p_cst) if (p_cst)
STRCPY(buf, "cstag "); STRCPY(buf, "cstag ");
@@ -5526,11 +5528,15 @@ nv_ident(cap)
default: default:
if (curbuf->b_help) if (curbuf->b_help)
STRCPY(buf, "he! "); STRCPY(buf, "he! ");
else if (g_cmd) else
{
tag_cmd = TRUE;
if (g_cmd)
STRCPY(buf, "tj "); STRCPY(buf, "tj ");
else else
sprintf((char *)buf, "%ldta ", cap->count0); sprintf((char *)buf, "%ldta ", cap->count0);
} }
}
/* /*
* Now grab the chars in the identifier * Now grab the chars in the identifier
@@ -5562,8 +5568,10 @@ nv_ident(cap)
aux_ptr = (char_u *)(p_magic ? "/.*~[^$\\" : "/^$\\"); aux_ptr = (char_u *)(p_magic ? "/.*~[^$\\" : "/^$\\");
else if (cmdchar == '#') else if (cmdchar == '#')
aux_ptr = (char_u *)(p_magic ? "/?.*~[^$\\" : "/?^$\\"); aux_ptr = (char_u *)(p_magic ? "/?.*~[^$\\" : "/?^$\\");
else else if (tag_cmd)
/* Don't escape spaces and Tabs in a tag with a backslash */ /* Don't escape spaces and Tabs in a tag with a backslash */
aux_ptr = (char_u *)"\\|\"\n[";
else
aux_ptr = (char_u *)"\\|\"\n*?["; aux_ptr = (char_u *)"\\|\"\n*?[";
p = buf + STRLEN(buf); p = buf + STRLEN(buf);

View File

@@ -681,6 +681,8 @@ static char *(features[]) =
static int included_patches[] = static int included_patches[] =
{ /* Add new patch number below this line */ { /* Add new patch number below this line */
/**/
335,
/**/ /**/
334, 334,
/**/ /**/