1
0
forked from aniani/vim

patch 8.0.1772: quickfix: mixup of FALSE and FAIL, returning -1

Problem:    Quickfix: mixup of FALSE and FAIL, returning -1.
Solution:   Use FAIL and INVALID_QFIDX. (Yegappan Lakshmanan)
This commit is contained in:
Bram Moolenaar 2018-04-28 21:56:44 +02:00
parent 50182fa84e
commit 29ce409bfc
2 changed files with 6 additions and 4 deletions

View File

@ -2351,7 +2351,7 @@ qf_jump_edit_buffer(
if (!can_abandon(curbuf, forceit)) if (!can_abandon(curbuf, forceit))
{ {
no_write_message(); no_write_message();
retval = FALSE; retval = FAIL;
} }
else else
retval = do_ecmd(qf_ptr->qf_fnum, NULL, NULL, NULL, (linenr_T)1, retval = do_ecmd(qf_ptr->qf_fnum, NULL, NULL, NULL, (linenr_T)1,
@ -2395,7 +2395,7 @@ qf_jump_edit_buffer(
} }
if (*abort) if (*abort)
retval = FALSE; retval = FAIL;
} }
return retval; return retval;
@ -4172,7 +4172,7 @@ qf_id2nr(qf_info_T *qi, int_u qfid)
for (qf_idx = 0; qf_idx < qi->qf_listcount; qf_idx++) for (qf_idx = 0; qf_idx < qi->qf_listcount; qf_idx++)
if (qi->qf_lists[qf_idx].qf_id == qfid) if (qi->qf_lists[qf_idx].qf_id == qfid)
return qf_idx; return qf_idx;
return -1; return INVALID_QFIDX;
} }
/* /*
@ -4889,7 +4889,7 @@ get_errorlist(qf_info_T *qi_arg, win_T *wp, int qf_idx, list_T *list)
} }
} }
if (qf_idx == -1) if (qf_idx == INVALID_QFIDX)
qf_idx = qi->qf_curlist; qf_idx = qi->qf_curlist;
if (qf_idx >= qi->qf_listcount if (qf_idx >= qi->qf_listcount

View File

@ -761,6 +761,8 @@ static char *(features[]) =
static int included_patches[] = static int included_patches[] =
{ /* Add new patch number below this line */ { /* Add new patch number below this line */
/**/
1772,
/**/ /**/
1771, 1771,
/**/ /**/