Hi Bram, On Tue, Aug 14, 2018 at 4:38 AM, Bram Moolenaar <[email protected]> wrote: > > Yegappan wrote: > >> There are several places in quickfix.c where a command index is >> checked to see whether it refers to a location list command. >> For readability reasons, it is better to add a function that checks >> for location list commands. I am attaching a patch which adds >> this function and uses it. The patch also includes simplification >> for a couple of long checks in a function call. >> >> There is a minor performance penalty from the additional checks >> for the various supported location list commands. But this is >> negligible as this function is not called from any frequently >> executed code path. > > Hmm, I don't really like the long case list. > > Can't we use: eap->cmd[0] == 'l' >
Yes. All the Ex commands that operate on the location list start with an 'l' and all the Ex commands that operate on the quickfix list start with a 'c'. I am attaching an updated patch that uses the above comparison. Regards, Yegappan > > Another way would be to use a flag in the command table. But we are > already close to running out of bits. > -- -- 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.
loclistcmd.diff
Description: Binary data
