aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--runtime/doc/quickfix.txt18
-rw-r--r--src/nvim/quickfix.c24
-rw-r--r--src/nvim/version.c2
3 files changed, 36 insertions, 8 deletions
diff --git a/runtime/doc/quickfix.txt b/runtime/doc/quickfix.txt
index 3b54faf18e..e2a44541ae 100644
--- a/runtime/doc/quickfix.txt
+++ b/runtime/doc/quickfix.txt
@@ -1,4 +1,4 @@
-*quickfix.txt* For Vim version 7.4. Last change: 2016 Mar 19
+*quickfix.txt* For Vim version 7.4. Last change: 2016 Jul 01
VIM REFERENCE MANUAL by Bram Moolenaar
@@ -259,9 +259,23 @@ location list command, it will be aborted.
The 'switchbuf' settings are respected when jumping
to a buffer.
+:cl[ist] +{count} List the current and next {count} valid errors. This
+ is similar to ":clist from from+count", where "from"
+ is the current error position.
+
:cl[ist]! [from] [, [to]]
List all errors.
+:cl[ist]! +{count} List the current and next {count} error lines. This
+ is useful to see unrecognized lines after the current
+ one. For example, if ":clist" shows:
+ 8384 testje.java:252: error: cannot find symbol ~
+ Then using ":cl! +3" shows the reason:
+ 8384 testje.java:252: error: cannot find symbol ~
+ 8385: ZexitCode = Fmainx(); ~
+ 8386: ^ ~
+ 8387: symbol: method Fmainx() ~
+
*:lli* *:llist*
:lli[st] [from] [, [to]]
Same as ":clist", except the location list for the
@@ -306,7 +320,7 @@ EXECUTE A COMMAND IN ALL THE BUFFERS IN QUICKFIX OR LOCATION LIST:
etc.
< When the current file can't be |abandon|ed and the [!]
is not present, the command fails.
- When an error is detected excecution stops.
+ When an error is detected execution stops.
The last buffer (or where an error occurred) becomes
the current buffer.
{cmd} can contain '|' to concatenate several commands.
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,