1
0
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:
Bram Moolenaar
2016-09-27 21:28:56 +02:00
parent 0e77b7691e
commit 890680ca63
4 changed files with 17 additions and 7 deletions

View File

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