Dominique Pelle wrote:
> Bram Moolenaar <[email protected]> wrote:
>
> > Patch 7.3.1116
> > Problem: Can't build without Visual mode.
> > Solution: Add #ifdefs.
> > Files: src/regexp_nfa.c
[...]
> Hi
>
> This patch introduces what looks like a bug in
> vim tiny (built without FEAT_VISUAL).
>
> With regexpengine=1 (old engine), doing...
>
> :s/\%V./x
>
> results in:
>
> E486: Pattern not found: \%V.
>
> With regexpengine=0 (new engine), doing the same....
>
> :s/\%V./x
>
> results in:
>
> E867: (NFA) Unknown operator '\%V'
> E476: Invalid command
>
>
> Another difference with vim.tiny old engine:
>
> :v/\%V./d
>
> works without error and remove every lines.
>
> With the new engine, doing the same does not
> delete any line and give errors:
>
> E867: (NFA) Unknown operator '\%V'
> E476: Invalid command
>
>
> I don't think it should be different between the 2 regexp engines.
> When VISUAL feature is disabled, there is no way to visual select, so
> using \%V will never match and the old engine behavior is correct in
> my opinion. Giving E867 & E476 is not right. At least there is a
> discrepancies between regexp engines.
>
> I think that the only difference in code, when FEAT_VISUAL is
> disabled, is that it should behave as if reg_match_visual() returned
> false.
>
> The attached patch makes it work the same as the old engine (as was in
> fact done in a patch that I sent yesterday).
Yeah, the regexp as such is not invalid. But it will never match.
Hmm, not sure what the right solution is.
So let's just keep it as it was.
--
>From "know your smileys":
<<<:-{ Worf (Never smiles anyways, so he's a bad smiley)
/// 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.