On Do, 19 Sep 2013, Jonathon Merz wrote:

> With the new regexp engine, when searching for a null character using
> decimal/octal/hex character matches, all lines are matched instead of only
> the specified character.
> 
> The attached .txt file (ok to attach I hope) has a null character
> (represented as "^@") in the first line.
> 
> Using the new engine:
>     \%#=2\%d0
> Matches all lines in the file, but using:

That doesn't match for me anything.

>     \%#=1\%d0
> matches only the null character as expected.
> 
> The same goes for using \%o and \%x to match characters specified in octal
> and hex.

This patch fixes it:
diff --git a/src/regexp_nfa.c b/src/regexp_nfa.c
--- a/src/regexp_nfa.c
+++ b/src/regexp_nfa.c
@@ -1385,7 +1385,7 @@
                               _("E678: Invalid character after %s%%[dxouU]"),
                                    reg_magic == MAGIC_ALL);
                        /* TODO: what if a composing character follows? */
-                       EMIT(nr);
+                       EMIT(nr == 0 ? 0x0a : nr);
                    }
                    break;

regards,
Christian
-- 
Hat der Bauer voll die Scheuer zahlt er etwas mehr an Steuer.

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