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".

e8fea0728a
This commit is contained in:
Jurica Bradarić 2016-09-04 23:40:12 +02:00 committed by Justin M. Keyes
parent e75e9c10dc
commit 0f381f26cb
3 changed files with 36 additions and 8 deletions

View File

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

View File

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

View File

@ -305,7 +305,7 @@ static int included_patches[] = {
// 1974 NA
1973,
// 1972,
// 1971,
1971,
// 1970,
// 1969 NA
// 1968,