0
0
mirror of https://github.com/vim/vim.git synced 2025-09-23 03:43:49 -04:00

patch 7.4.1971

Problem:    It is not easy to see unrecognized error lines below the current
            error position.
Solution:   Add ":clist +count".
This commit is contained in:
Bram Moolenaar
2016-07-01 14:48:27 +02:00
parent 70e136e1d8
commit e8fea0728a
3 changed files with 39 additions and 9 deletions

View File

@@ -2258,6 +2258,7 @@ qf_list(exarg_T *eap)
int idx1 = 1;
int idx2 = -1;
char_u *arg = eap->arg;
int plus = FALSE;
int all = eap->forceit; /* if not :cl!, only show
recognised errors */
qf_info_T *qi = &ql_info;
@@ -2278,16 +2279,30 @@ qf_list(exarg_T *eap)
EMSG(_(e_quickfix));
return;
}
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;