mirror of
https://github.com/vim/vim.git
synced 2025-09-29 04:34:16 -04:00
patch 8.1.0288: quickfix code uses cmdidx too often
Problem: Quickfix code uses cmdidx too often. Solution: Add is_loclist_cmd(). (Yegappan Lakshmanan)
This commit is contained in:
@@ -12529,6 +12529,20 @@ ex_folddo(exarg_T *eap)
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifdef FEAT_QUICKFIX
|
||||
/*
|
||||
* Returns TRUE if the supplied Ex cmdidx is for a location list command
|
||||
* instead of a quickfix command.
|
||||
*/
|
||||
int
|
||||
is_loclist_cmd(int cmdidx)
|
||||
{
|
||||
if (cmdidx < 0 || cmdidx > CMD_SIZE)
|
||||
return FALSE;
|
||||
return cmdnames[cmdidx].cmd_name[0] == 'l';
|
||||
}
|
||||
#endif
|
||||
|
||||
# if defined(FEAT_TIMERS) || defined(PROTO)
|
||||
int
|
||||
get_pressedreturn(void)
|
||||
|
Reference in New Issue
Block a user