Christian Brabandt wrote:

> On Tue, June 4, 2013 18:29, Bram Moolenaar wrote:
> >
> > Patch 7.3.1112
> > Problem:    New regexp engine: \%V not supported.
> > Solution:   Implement \%V.  Add tests.
> > Files:          src/regexp.c, src/regexp_nfa.c, src/testdir/test64.in,
> >         src/testdir/test64.ok
> 
> The good thing about this is, it behaves exactly like the old engine.
> The bad thing is, the old engine has an long standing bug with \%V ;(
> 
> e.g:
> 
> vim -u NONE -N
> ifoobar<esc>
> 0ve<esc>
> /\%Vfoobar\%V
> 
> I should have probably provided a fix long ago.

It's not a bug, as others have mentioned.  This can't be changed without
being incompatible.

Other items have the same problem, that you intuitively expect them to
match on the previous character.  Thus only doing something for the
Visual area is not the right solution.

We could have some kind of modifier, apply the zero-width match on the
previous position.  Could also have it for other matches, e.g. to check
if the previous character is "<".  Currently patterns use \@<=, which is
very expensive (it tries many starting positions).

Perhaps we can use \@0<= for this.  \@1<= doesn't do quite the same
thing, since it checks if the end of the match is the current position,
which won't work for zero-width matches.

-- 
>From "know your smileys":
 :-H    Is missing teeth

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