Yegappan Lakshmanan wrote: > On Mon, Jul 18, 2016 at 2:11 PM, Bram Moolenaar <[email protected]> wrote: > > > > The number of commands and functions for quickfix functionality keeps > > growing. It would be good to reduce this a bit. > > > > getqflist() currently does not take an argument. It could use an > > argument to specify what to get, instead of the whole list. > > So how about passing a dictionary? One of the items could be to get the > > aux data instead of the list of errors. > > > > For setqflist() it's a bit more tricky, since it already has a second > > "action" argument. But we can add the dictionary as the third argument. > > > > Perhaps getting and setting the quickfix title would also fit in here? > > And it allows for the filtering that we had a patch for? > > Would be good to get an overview before making more changes. > > > > I am attaching a patch to enhance the getqflist/getloclist() functions to > return the title string and the setqflist()/setloclist() functions to set > the title string. > > After this patch is incorporated, it will be easy to add the additional > items (e.g. context, items, number, stack, etc.). > > The getqflist/setqflist functions now accept an optional dictionary > parameter. The dictionary parameter specifies which items to get or set. > If the {dict} argument is specified, then the getqflist function returns a > dictionary.
I think this generally is a good way to do it. In the implementation, splitting f_getqflist() into two functions that look quite similar doesn't seem like a good idea. -- User: I'm having problems with my text editor. Help desk: Which editor are you using? User: I don't know, but it's version VI (pronounced: 6). Help desk: Oh, then you should upgrade to version VIM (pronounced: 994). /// 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.
