On Saturday, June 16, 2012 12:02:19 PM UTC-5, Eric Van Dewoestine wrote:
> On 2012-06-07 09:57:53, Benjamin Fritz wrote:
> > I added this to my config as a hack to show info about the search
> > which generated a quickfix/location list (like :CSearch), but it's
> > probably not the best way to accomplish it:
> >
> >
> > [patch removed]
>
> I finally got a chance to play with this, and while I like the idea,
> setting w:quickfix_title doesn't work very well. That variable gets
> reset on any updates to the quickfix/loclist window, so if you close
> and then reopen the window, any changes to w:quickfix_title are lost
> (same with :cnewer/:colder).
>
> So, I decided to take a crack at patching vim to add two new
> functions: setqftitle() and setloctitle()
>
I noticed that same problem quite a while ago, that you can use setqflist and
the list is stored with :colder and :cnewer, but the title is not. Am I to
understand that setqftitle(), followed by a new command creating a new
quickfix list, followed by :colder, would restore the title? That sounds like
an excellent feature (maybe even a bug fix)!
> My C skills are pretty poor these days (not that they were ever very
> good), so my patch could very well have some silly mistakes, but it
> seems to be working pretty good for me. I was hoping you'd give it a
> shot and if you can't find any issues I'll submit it to vim-dev and
> see if it can get accepted into the mainline.
>
I'll see if I can try it out from home sometime in the next couple of weeks. I
don't use a custom-compiled Vim at work where I normally use Eclim.
I'm not very knowledgeable about the Vim C code itself, so you may get
faster/better feedback if you just post to vim_dev directly. I'll certainly
download and apply the patch at home though and see what it can do.
> Note: I haven't made any changes to eclim yet, so to utilize the patch
> you'll have to update your submitted patch to call setqftitle()
> instead of setting w:quickfix_title directly. If this patch makes it
> into vim then I'll go through the eclim code and set the
> quickfix/loclist titles accordingly.
>
Sounds good. I'll admit I'm not happy when I lose the title or the title
becomes innacurate because of a new quickfix command, so probably the feature
isn't worth adding until the title is actually associated with the list.