Yegappan wrote:

> > > When I try to run the "2vimgrep buf_T *.c"  command from
> > > an empty buffer, I see the following error:
> > >
> > > E315: ml_get: invalid lnum: 2
> > >
> > > This doesn't happen if the current buffer has 2 or more lines.
> > > It looks like Vim is trying to highlight the specified pattern and
> > > as part of that trying to read the current buffer.
> > >
> >
> > In addition to the above error, the feature to specify the maximum
> > number of matches to vimgrep was recently broken. I am attaching
> > a patch to fix this problem. This should be applied only after the
> > above mentioned issue is resolved.
> >
> 
> The attached patch fixes both of the above issues.

Thanks!

Instead of adjusting search_first_line, I think it's better to
keep it's invalid value and have the check where it is used.

-- 
    A KNIGHT rides into shot and hacks him to the ground.  He rides off.
    We stay for a moment on the glade.  A MIDDLE-AGED LADY in a C. & A.
    twin-set emerges from the trees and looks in horror at the body of her
    HUSBAND.
MRS HISTORIAN: FRANK!
                 "Monty Python and the Holy Grail" PYTHON (MONTY) PICTURES LTD

 /// 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/d/optout.

Raspunde prin e-mail lui