mirror of
https://github.com/neovim/neovim.git
synced 2025-10-17 15:21:47 +00:00
vim-patch:8.1.0288: quickfix code uses cmdidx too often
Problem: Quickfix code uses cmdidx too often.
Solution: Add is_loclist_cmd(). (Yegappan Lakshmanan)
396659592f
This commit is contained in:
@@ -10139,6 +10139,17 @@ static void ex_folddo(exarg_T *eap)
|
||||
ml_clearmarked(); // clear rest of the marks
|
||||
}
|
||||
|
||||
// Returns true if the supplied Ex cmdidx is for a location list command
|
||||
// instead of a quickfix command.
|
||||
bool is_loclist_cmd(int cmdidx)
|
||||
FUNC_ATTR_PURE FUNC_ATTR_WARN_UNUSED_RESULT
|
||||
{
|
||||
if (cmdidx < 0 || cmdidx > CMD_SIZE) {
|
||||
return false;
|
||||
}
|
||||
return cmdnames[cmdidx].cmd_name[0] == 'l';
|
||||
}
|
||||
|
||||
bool get_pressedreturn(void)
|
||||
FUNC_ATTR_PURE FUNC_ATTR_WARN_UNUSED_RESULT
|
||||
{
|
||||
|
Reference in New Issue
Block a user