Anton Lindqvist wrote:
> The goto declaration commands (gd and gD) only discards completely
> commented out lines. In the following scenario pressing 'gd' would place
> the cursor on the occurrence of x inside the trailing comment:
>
> int func(int x) /* x is an int */
> {
> return x;
> ^
> |
> cursor
> }
>
> This is by design, the search is not terminated at the first occurrence
> of the identifier in order to handle K&R function declarations
> correctly.
>
> The attached patch add support for discarding any type of C-style
> comment. Thus, it does not respect the commentstring option. I think
> this is reasonable since the behavior of gd and gD is tailored for C
> code but occasionally works well with other similar languages. Another
> limitation of the attached patch is that it does not recognize nested
> multi-line comments (/* /* nested */ */) but should one care?
>
> While at it, improve the test coverage for both gd and gD.
Thanks, I'll add it in the todo list.
--
hundred-and-one symptoms of being an internet addict:
104. When people ask about the Presidential Election you ask "Which country?"
/// 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/d/optout.