69989Re: [patch] get quickfix stack
- May 21 10:51 PM
On 21 May 2013, Christian Brabandt <cblists@...> wrote:
> getlocstack() returns the location list stack as list
> getlocstackptr() returns the current position in the location list stack
> getloctitle() returns a list of titles for the location list stack
> getqfstack() returns the quickfix stack as list
> getqfstackptr() returns the index in the quickfix stack
> getqftitle() returns a list of titles in the quickfix stack
> setlocstackptr() sets the index in the location list stack
> setqfstackptr() sets the index in the quickfix list
> setqftitle() sets the title for the current item in the quickfix list stack
> setloctitle() sets the title for the current item in the location list stack
On 22 May 2013, LCD 47 <lcd047@...> wrote:
> Excellent, thank you! I'll play with it for a while, then post my
There seems to be a bug in getlocstack(), it misses the first entry.
Example: after a single run of syntastic check:
Here getloctitle() seems to work correctly. Also getlocstackptr()
should probably return -1 rather than 0 if the stack is empty (calling
getlocstack() to find out is expensive in terms of memory).
I haven't looked at setlocstack() and getqf*() / setqf*().
There are a few mistakes and omissions in the manual:
(1) getlocstackptr() and getloctitle() take an argument, while
(2) the arguments for the new functions are not described;
(3) it's not clear if the stack pointers are 0- or 1-based.
From the point of view of design, I still claim it would have been
cleaner to assign handle IDs to loclists, the same way it's done for
buffers, windows, tabs, and basically everything else. It would have
allowed to solve the last piece of the puzzle, namely converting between
the current window, the associated loclist, and the associated loclist
window: these might all have been attributes of the loclists.
Without handle IDs, you basically have to use the stack to point
functions to the relevant loclist. This works, but it's a rather ugly
hack, and it doesn't extend easily to finding, say, the loclist window
associated to the current window.
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 vim_dev+unsubscribe@....
For more options, visit https://groups.google.com/groups/opt_out.
- << Previous post in topic Next post in topic >>