From 0f381f26cbbe7f50de106c996d8a9d946db61574 Mon Sep 17 00:00:00 2001 From: Jurica Bradarić Date: Sun, 4 Sep 2016 23:40:12 +0200 Subject: vim-patch:7.4.1971 (#5262) Problem: It is not easy to see unrecognized error lines below the current error position. Solution: Add ":clist +count". https://github.com/vim/vim/commit/e8fea0728a2fa1fe78ef0ac90dee1a84bd7ef9fb --- src/nvim/quickfix.c | 24 +++++++++++++++++++----- src/nvim/version.c | 2 +- 2 files changed, 20 insertions(+), 6 deletions(-) (limited to 'src') diff --git a/src/nvim/quickfix.c b/src/nvim/quickfix.c index 20bd0a62b8..2a3cdfa790 100644 --- a/src/nvim/quickfix.c +++ b/src/nvim/quickfix.c @@ -1732,15 +1732,29 @@ void qf_list(exarg_T *eap) EMSG(_(e_quickfix)); return; } + + bool plus = false; + if (*arg == '+') { + arg++; + plus = true; + } if (!get_list_range(&arg, &idx1, &idx2) || *arg != NUL) { EMSG(_(e_trailing)); return; } - i = qi->qf_lists[qi->qf_curlist].qf_count; - if (idx1 < 0) - idx1 = (-idx1 > i) ? 0 : idx1 + i + 1; - if (idx2 < 0) - idx2 = (-idx2 > i) ? 0 : idx2 + i + 1; + if (plus) { + i = qi->qf_lists[qi->qf_curlist].qf_index; + idx2 = i + idx1; + idx1 = i; + } else { + i = qi->qf_lists[qi->qf_curlist].qf_count; + if (idx1 < 0) { + idx1 = (-idx1 > i) ? 0 : idx1 + i + 1; + } + if (idx2 < 0) { + idx2 = (-idx2 > i) ? 0 : idx2 + i + 1; + } + } if (qi->qf_lists[qi->qf_curlist].qf_nonevalid) all = TRUE; diff --git a/src/nvim/version.c b/src/nvim/version.c index d37eec1c28..7ce9df4c6e 100644 --- a/src/nvim/version.c +++ b/src/nvim/version.c @@ -305,7 +305,7 @@ static int included_patches[] = { // 1974 NA 1973, // 1972, - // 1971, + 1971, // 1970, // 1969 NA // 1968, -- cgit