diff options
author | Bram Moolenaar <Bram@vim.org> | 2010-01-19 15:24:27 +0100 |
---|---|---|
committer | Bram Moolenaar <Bram@vim.org> | 2010-01-19 15:24:27 +0100 |
commit | 6d8027a6c2b80318ca154ca6cde0fd930f149f03 (patch) | |
tree | a229d37632c1f6c63a44be2a9c7a4e9a4a87aa33 /src/normal.c | |
parent | 8065d7fd9c470e4672bad7fc8925b4f25c80dd6e (diff) |
updated for version 7.2.335v7.2.335
Problem: The CTRL-] command escapes too many characters.
Solution: Use a different list of characters to be escaped. (Sergey Khorev)
Diffstat (limited to 'src/normal.c')
-rw-r--r-- | src/normal.c | 16 |
1 files changed, 12 insertions, 4 deletions
diff --git a/src/normal.c b/src/normal.c index 0c2325d931..fade0fc3f7 100644 --- a/src/normal.c +++ b/src/normal.c @@ -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); |