On 8 July 2016, Bram Moolenaar <[email protected]> wrote:
>
> Lcd wrote:
>
> > On 7 July 2016, Bram Moolenaar <[email protected]> wrote:
> > >
> > > Christian Brabandt wrote:
> > >
> > > > On Do, 07 Jul 2016, Bram Moolenaar wrote:
> > > >
> > > > >
> > > > > There has been a request that when adding items to the
> > > > > quickfix list, no buffer is created to hold the file name.
> > > > >
> > > > > The reason is that when there are many different file names
> > > > > this causes the buffer list to get very long, which then
> > > > > causes various operations to become slow.  Including finding
> > > > > the buffer for a file name.
> > > > >
> > > > > Instead of using a buffer, where the file name is stored, and
> > > > > then using the buffer number, the file name itself could be
> > > > > remembered.
> > > > >
> > > > > Since there are so many quickfix commands, adding a flag to
> > > > > every one of them would be creating quite a mess.  We could
> > > > > add an option, but that has the danger of forgetting to reset
> > > > > the option after the operation.  And it requires three more
> > > > > statements (save current value, set the option, restore th
> > > > > option).  So I was thinking of using a command modifier:
> > > > >
> > > > >   :usefname caddexpr {expr}
> > > > >
> > > > > How about that?
> > > >
> > > > That means, the buffer would only be created once you are
> > > > jumping to the file?
> > >
> > > Yes.
> > [...]
> >
> >     This would be a huge setback for plugins that expect error
> > items to always have access to a buffer if they refer to a file
> > at all.  Essentially it would be the end of filtering operations
> > for syntastic (and probably the end of life for syntastic on newer
> > versions of Vim).
>
> I don't understand.  What does "access to a buffer" mean?

    Syntastic is a sort of generalised compiler set, it runs external
compilers, and shows the results in a loclist.  Except it does a lot
more than just open the loclist: it places signs, adds highlighting
patterns, shows errors in balloons, shows the nearest error, and so
on.  There is some bookkeeping involved, and syntastic needs actual
buffers to set local options, local variables, place signs, munge error
messages according to context, check that error lines are not outside
the file, and the like.  Could all that be done starting from filenames?
Probably, with a rewrite from scratch of the core.  Somebody else might
even take up that task some day.

> Anyway, the idea was that this is only used for specific purposes
> where a buffer is not needed, e.g. a list of matches for "grep".

    The point is, there will be two kinds of loclists: "rich" ones (with
buffers), and "poor" ones (with filenames).  Syntastic would need to
deal with both.

    /lcd

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