I saw this as an entry in todo.txt. E.g. pattern.txt line 1056 has a
line

                \n      line break, see above |/[\n]|

When you position the cursor within the |/[\n]| and press CTRL-] to
jump to the help topic, it jumps to the wrong one: /\\ instead of /
[\n]. It turns out this is because the CTRL-] is translated internally
into ":he! /\[\\n]", i.e. with [ and \ escaped. This escaping is
wrong: while :help does support wildcard characters, it handles
escaping of characters that were probably meant literally itself; so
":help /[\n]" works correctly.

Carlo

diff --git a/runtime/doc/todo.txt b/runtime/doc/todo.txt
--- a/runtime/doc/todo.txt
+++ b/runtime/doc/todo.txt
@@ -88,9 +88,6 @@

 Patch for 2html to support 'fileencoding'. (Benjamin Fritz, 2010 Sep
10)

-CTRL-] on help tag |/[\n]| doesn't jump to the right place. (Tony
Mechelynck,
-2010 Aug 8)
-
 Three patches for undo persistence. (Christian Brabandt, 2010 Sep 4)

 string() can't parse back "inf" and "nan".  Fix documentation or fix
code?
diff --git a/src/normal.c b/src/normal.c
--- a/src/normal.c
+++ b/src/normal.c
@@ -5622,11 +5622,11 @@
            break;

        default:
-           tag_cmd = TRUE;
            if (curbuf->b_help)
                STRCPY(buf, "he! ");
            else
            {
+                tag_cmd = TRUE;
                if (g_cmd)
                    STRCPY(buf, "tj ");
                else
@@ -5666,10 +5666,9 @@
        else if (cmdchar == '#')
            aux_ptr = (char_u *)(p_magic ? "/?.*~[^$\\" : "/?^$\\");
        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*?[";
+           aux_ptr = (char_u *)"";

        p = buf + STRLEN(buf);
        while (n-- > 0)

-- 
You received this message from the "vim_dev" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

Raspunde prin e-mail lui