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.

I like this better, thanks.

-- 
   [The rest of the ARMY stand around looking at a loss.]
INSPECTOR END OF FILM: (picks up megaphone) All right!  Clear off!  Go on!
                 "Monty Python and the Holy Grail" PYTHON (MONTY) PICTURES LTD

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

Raspunde prin e-mail lui