diff options
author | Bram Moolenaar <Bram@vim.org> | 2018-04-28 21:56:44 +0200 |
---|---|---|
committer | Bram Moolenaar <Bram@vim.org> | 2018-04-28 21:56:44 +0200 |
commit | 29ce409bfca52bb8a07e2975d06fd788458e9861 (patch) | |
tree | 60b8bab97f270f15933d0aebf6e9bd004acb577a | |
parent | 50182fa84e20a0547f3e2bd6683ef799fcd27855 (diff) | |
download | vim-git-29ce409bfca52bb8a07e2975d06fd788458e9861.tar.gz |
patch 8.0.1772: quickfix: mixup of FALSE and FAIL, returning -1v8.0.1772
Problem: Quickfix: mixup of FALSE and FAIL, returning -1.
Solution: Use FAIL and INVALID_QFIDX. (Yegappan Lakshmanan)
-rw-r--r-- | src/quickfix.c | 8 | ||||
-rw-r--r-- | src/version.c | 2 |
2 files changed, 6 insertions, 4 deletions
diff --git a/src/quickfix.c b/src/quickfix.c index cc6fe0a07..19127027f 100644 --- a/src/quickfix.c +++ b/src/quickfix.c @@ -2351,7 +2351,7 @@ qf_jump_edit_buffer( if (!can_abandon(curbuf, forceit)) { no_write_message(); - retval = FALSE; + retval = FAIL; } else retval = do_ecmd(qf_ptr->qf_fnum, NULL, NULL, NULL, (linenr_T)1, @@ -2395,7 +2395,7 @@ qf_jump_edit_buffer( } if (*abort) - retval = FALSE; + retval = FAIL; } 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++) if (qi->qf_lists[qf_idx].qf_id == qfid) 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; if (qf_idx >= qi->qf_listcount diff --git a/src/version.c b/src/version.c index c7637a3fa..40b5815b1 100644 --- a/src/version.c +++ b/src/version.c @@ -762,6 +762,8 @@ static char *(features[]) = static int included_patches[] = { /* Add new patch number below this line */ /**/ + 1772, +/**/ 1771, /**/ 1770, |