Oops, further clarification on that:

1. Start vim with -u NONE -U NONE
2. Repeat the search from my previous email
3. Hit 'n' a few times - cursor hits first character of each line
4. :set hlsearch
5. The entirety of every line is highlighted

I was running with hlsearch on when I originally found it and figured that
the entire line was the match.  I still think that might be the case... if
I do:
    %s/\%#=2\%d0/_/g
The contents of every line (including empty lines) becomes an underscore
just as if I had done:
    %s/^.*$/_/g


And Christian's patch does fix all of the above for me.


Thanks,

Jonathon


On Thu, Sep 19, 2013 at 12:45 PM, Bram Moolenaar <[email protected]> wrote:

>
> 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:
> >     \%#=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.
>
> I can see \%d0 does not match the NUL, but I don't see it matching all
> lines.
>
> --
> You can tune a file system, but you can't tuna fish
>                                                         -- man tunefs
>
>  /// 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