Mercurial > vim
comparison src/quickfix.c @ 9379:b398e4e12751 v7.4.1971
commit https://github.com/vim/vim/commit/e8fea0728a2fa1fe78ef0ac90dee1a84bd7ef9fb
Author: Bram Moolenaar <Bram@vim.org>
Date: Fri Jul 1 14:48:27 2016 +0200
patch 7.4.1971
Problem: It is not easy to see unrecognized error lines below the current
error position.
Solution: Add ":clist +count".
author | Christian Brabandt <cb@256bit.org> |
---|---|
date | Fri, 01 Jul 2016 15:00:06 +0200 |
parents | ce5b79b005ec |
children | f094d4085014 |
comparison
equal
deleted
inserted
replaced
9378:966944639989 | 9379:b398e4e12751 |
---|---|
2256 qfline_T *qfp; | 2256 qfline_T *qfp; |
2257 int i; | 2257 int i; |
2258 int idx1 = 1; | 2258 int idx1 = 1; |
2259 int idx2 = -1; | 2259 int idx2 = -1; |
2260 char_u *arg = eap->arg; | 2260 char_u *arg = eap->arg; |
2261 int plus = FALSE; | |
2261 int all = eap->forceit; /* if not :cl!, only show | 2262 int all = eap->forceit; /* if not :cl!, only show |
2262 recognised errors */ | 2263 recognised errors */ |
2263 qf_info_T *qi = &ql_info; | 2264 qf_info_T *qi = &ql_info; |
2264 | 2265 |
2265 if (eap->cmdidx == CMD_llist) | 2266 if (eap->cmdidx == CMD_llist) |
2276 || qi->qf_lists[qi->qf_curlist].qf_count == 0) | 2277 || qi->qf_lists[qi->qf_curlist].qf_count == 0) |
2277 { | 2278 { |
2278 EMSG(_(e_quickfix)); | 2279 EMSG(_(e_quickfix)); |
2279 return; | 2280 return; |
2280 } | 2281 } |
2282 if (*arg == '+') | |
2283 { | |
2284 ++arg; | |
2285 plus = TRUE; | |
2286 } | |
2281 if (!get_list_range(&arg, &idx1, &idx2) || *arg != NUL) | 2287 if (!get_list_range(&arg, &idx1, &idx2) || *arg != NUL) |
2282 { | 2288 { |
2283 EMSG(_(e_trailing)); | 2289 EMSG(_(e_trailing)); |
2284 return; | 2290 return; |
2285 } | 2291 } |
2286 i = qi->qf_lists[qi->qf_curlist].qf_count; | 2292 if (plus) |
2287 if (idx1 < 0) | 2293 { |
2288 idx1 = (-idx1 > i) ? 0 : idx1 + i + 1; | 2294 i = qi->qf_lists[qi->qf_curlist].qf_index; |
2289 if (idx2 < 0) | 2295 idx2 = i + idx1; |
2290 idx2 = (-idx2 > i) ? 0 : idx2 + i + 1; | 2296 idx1 = i; |
2297 } | |
2298 else | |
2299 { | |
2300 i = qi->qf_lists[qi->qf_curlist].qf_count; | |
2301 if (idx1 < 0) | |
2302 idx1 = (-idx1 > i) ? 0 : idx1 + i + 1; | |
2303 if (idx2 < 0) | |
2304 idx2 = (-idx2 > i) ? 0 : idx2 + i + 1; | |
2305 } | |
2291 | 2306 |
2292 if (qi->qf_lists[qi->qf_curlist].qf_nonevalid) | 2307 if (qi->qf_lists[qi->qf_curlist].qf_nonevalid) |
2293 all = TRUE; | 2308 all = TRUE; |
2294 qfp = qi->qf_lists[qi->qf_curlist].qf_start; | 2309 qfp = qi->qf_lists[qi->qf_curlist].qf_start; |
2295 for (i = 1; !got_int && i <= qi->qf_lists[qi->qf_curlist].qf_count; ) | 2310 for (i = 1; !got_int && i <= qi->qf_lists[qi->qf_curlist].qf_count; ) |