forked from aniani/vim
patch 8.0.0017
Problem: Cannot get the number of the current quickfix or location list. Solution: Use the current list if "nr" in "what" is zero. (Yegappan Lakshmanan) Remove debug command from test.
This commit is contained in:
@@ -4591,9 +4591,13 @@ get_errorlist_properties(win_T *wp, dict_T *what, dict_T *retdict)
|
||||
/* Use the specified quickfix/location list */
|
||||
if (di->di_tv.v_type == VAR_NUMBER)
|
||||
{
|
||||
qf_idx = di->di_tv.vval.v_number - 1;
|
||||
if (qf_idx < 0 || qf_idx >= qi->qf_listcount)
|
||||
return FAIL;
|
||||
/* for zero use the current list */
|
||||
if (di->di_tv.vval.v_number != 0)
|
||||
{
|
||||
qf_idx = di->di_tv.vval.v_number - 1;
|
||||
if (qf_idx < 0 || qf_idx >= qi->qf_listcount)
|
||||
return FAIL;
|
||||
}
|
||||
flags |= QF_GETLIST_NR;
|
||||
}
|
||||
else
|
||||
|
Reference in New Issue
Block a user