Gary Johnson wrote:

> The :tjump command displays the character constant '\n' incorrectly
> as '\\n'.
> 
> To demonstrate this, create two files, foo.h and bar.h, each
> containing this one line:
> 
>     char newline = '\n';
> 
> Execute:
> 
>     $ ctags foo.h bar.h
>     $ vim -N -u NONE
>     :tjump newline
> 
> The output is:
> 
>       # pri kind tag               file
>       1 F   v    newline           bar.h
>                    char newline = '\\n';
>       2 F   v    newline           foo.h
>                    char newline = '\\n';
>     Type number and <Enter> (empty cancels): 
> 
> Note that the character constant '\n' is incorrectly displayed as
> '\\n'.
>
> The tags file itself contains the following.
> 
>     !_TAG_FILE_FORMAT       2       /extended format; --format=1 will not 
> append ;" to lines/
>     !_TAG_FILE_SORTED       1       /0=unsorted, 1=sorted, 2=foldcase/
>     !_TAG_PROGRAM_AUTHOR    Darren Hiebert  /[email protected]/
>     !_TAG_PROGRAM_NAME      Exuberant Ctags //
>     !_TAG_PROGRAM_URL       http://ctags.sourceforge.net    /official site/
>     !_TAG_PROGRAM_VERSION   5.8     //
>     newline bar.h   /^char newline = '\\n';$/;"     v
>     newline foo.h   /^char newline = '\\n';$/;"     v
> 
> This initially suggests that the error is in ctags, except that the
> tag is written as a regular expression rather than a string copy of
> the line.  Since Vim strips the leading '^' and trailing '$' when
> displaying the tag, it would be consistent and less confusing for
> Vim to strip the extra '\' as well.

Yeah, it would be better to unescape the regexp.


-- 
Support your right to bare arms!  Wear short sleeves!

 /// Bram Moolenaar -- [email protected] -- http://www.Moolenaar.net   \\\
///        sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
\\\  an exciting new programming language -- http://www.Zimbu.org        ///
 \\\            help me help AIDS victims -- http://ICCF-Holland.org    ///

-- 
-- 
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

--- 
You received this message because you are subscribed to the Google Groups 
"vim_dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/groups/opt_out.

Raspunde prin e-mail lui