On Thu, Apr 27, 2006 at 06:23:30PM -0400, [EMAIL PROTECTED] wrote:
> I noticed that the matchparen plugin sometimes highlighted the wrong
> parenthesis.
>
> If syntax=c and the user types 'A' to start inserting text at the end of
> the following line:
> ((""))
> then the last ')' will be highlighted, but the _second_ (not the first)
> '(' will be highlighted.
>
>
> The following fixes this problem:
> ===================================================================
> --- runtime/plugin/matchparen.vim (revision 12)
> +++ runtime/plugin/matchparen.vim (working copy)
> @@ -88,7 +88,7 @@
> endif
>
> " When not in a string or comment ignore matches inside them.
> - let s_skip ='synIDattr(synID(line("."), col(".") - before, 0), "name") ' .
> + let s_skip ='synIDattr(synID(line("."), col("."), 0), "name") ' .
> \ '=~? "string\\|comment"'
> execute 'if' s_skip '| let s_skip = 0 | endif'
> ===================================================================
Coincidentally, this problem was reported yesterday (or maybe late
the previous day) on the vim users' list. Bram and I each posted a
patch similar to yours: we also moved the lines shown in your patch
down a few lines.
--Benji Fisher