0
0
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:
Bram Moolenaar
2018-08-15 20:59:48 +02:00
parent 37b15568c2
commit 396659592f
4 changed files with 71 additions and 59 deletions

View File

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