Hi James,

On Mon, Mar 20, 2017 at 4:46 PM, James McCoy <[email protected]> wrote:
> On Mon, Mar 20, 2017 at 08:26:27AM -0700, Yegappan Lakshmanan wrote:
>> Hi all,
>>
>> When developing additional tests for the quickfix functionality,
>> I found that some part of the code checks whether the quickfix
>> or location list stack is empty. To test for these conditions, we
>> need a function to delete the quickfix and location list stacks.
>>
>> What about extending the setqflist() and setloclist() functions
>> to add support for deleting a list? If the action parameter is 'd',
>> then delete the last quickfix/location list. If the action
>> parameter is 'w', then wipe out the entire list.
>>
>> setqflist([], 'd')  - Delete the last quickfix list.
>> setqflist([], 'w') - Wipe out the quickfix stack.
>> setloclist(0, [], 'd') - Delete the last location list.
>> setloclist(0, [], 'w') - Wipe out the location list stack.
>>
>> Do you have any other suggestions?
>
> Why keep shoe-horning things into the set{qf,loc}list functions?  This
> just makes it an awkward API to use.
>
> I would suggest alternatives of
>
>   qflistdelete([{list}])
>   loclistdelete({winid}[, {list}])
>   qflistreset()
>   loclistreset({winid})
>

Some time ago there was a push back on adding more functions for
the quickfix functionality (as there are already too many quickfix
commands/functions). So I am trying to add this to the setqflist()
function.

Currently setqflist() is used to add or replace an existing
quickfix list. It makes sense to extend this function to also support
deleting a quickfix list.

- Yegappan

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