diff options
author | Bram Moolenaar <Bram@vim.org> | 2006-02-09 23:53:20 +0000 |
---|---|---|
committer | Bram Moolenaar <Bram@vim.org> | 2006-02-09 23:53:20 +0000 |
commit | 754b56089f334509ee23f70fe9d046120e91f0e6 (patch) | |
tree | a22dc3faed963271a15be3dff335fc4de2f37200 /src/quickfix.c | |
parent | cf0c554e3f841eefd3208aee3f6359da3e6395f4 (diff) | |
download | vim-git-754b56089f334509ee23f70fe9d046120e91f0e6.tar.gz |
updated for version 7.0195
Diffstat (limited to 'src/quickfix.c')
-rw-r--r-- | src/quickfix.c | 38 |
1 files changed, 22 insertions, 16 deletions
diff --git a/src/quickfix.c b/src/quickfix.c index f9278a2f0..ba6bcf088 100644 --- a/src/quickfix.c +++ b/src/quickfix.c @@ -2575,8 +2575,10 @@ buf_hide(buf) grep_internal(cmdidx) cmdidx_T cmdidx; { - return ((cmdidx == CMD_grep || cmdidx == CMD_lgrep - || cmdidx == CMD_grepadd || cmdidx == CMD_lgrepadd) + return ((cmdidx == CMD_grep + || cmdidx == CMD_lgrep + || cmdidx == CMD_grepadd + || cmdidx == CMD_lgrepadd) && STRCMP("internal", *curbuf->b_p_gp == NUL ? p_gp : curbuf->b_p_gp) == 0); } @@ -2598,12 +2600,12 @@ ex_make(eap) switch (eap->cmdidx) { - case CMD_make: au_name = (char_u *)"make"; break; - case CMD_lmake: au_name = (char_u *)"lmake"; break; - case CMD_grep: au_name = (char_u *)"grep"; break; - case CMD_lgrep: au_name = (char_u *)"lgrep"; break; - case CMD_grepadd: au_name = (char_u *)"grepadd"; break; - case CMD_lgrepadd: au_name = (char_u *)"lgrepadd"; break; + case CMD_make: au_name = (char_u *)"make"; break; + case CMD_lmake: au_name = (char_u *)"lmake"; break; + case CMD_grep: au_name = (char_u *)"grep"; break; + case CMD_lgrep: au_name = (char_u *)"lgrep"; break; + case CMD_grepadd: au_name = (char_u *)"grepadd"; break; + case CMD_lgrepadd: au_name = (char_u *)"lgrepadd"; break; default: break; } if (au_name != NULL) @@ -2908,7 +2910,7 @@ ex_vimgrep(eap) } #endif - if (eap->cmdidx == CMD_grep + if (eap->cmdidx == CMD_lgrep || eap->cmdidx == CMD_lvimgrep || eap->cmdidx == CMD_lgrepadd || eap->cmdidx == CMD_lvimgrepadd) @@ -2939,7 +2941,7 @@ ex_vimgrep(eap) goto theend; } - if ((eap->cmdidx != CMD_grepadd && eap->cmdidx != CMD_lgrepadd && + if ((eap->cmdidx != CMD_grepadd && eap->cmdidx != CMD_lgrepadd && eap->cmdidx != CMD_vimgrepadd && eap->cmdidx != CMD_lvimgrepadd) || qi->qf_curlist == qi->qf_listcount) /* make place for a new list */ @@ -3476,10 +3478,15 @@ ex_cbuffer(eap) || eap->line2 < 1 || eap->line2 > buf->b_ml.ml_line_count) EMSG(_(e_invrange)); else - qf_init_ext(qi, NULL, buf, NULL, p_efm, - (eap->cmdidx == CMD_cbuffer - || eap->cmdidx == CMD_lbuffer), - eap->line1, eap->line2); + { + int buffer_cmd = (eap->cmdidx == CMD_cbuffer + || eap->cmdidx == CMD_lbuffer); + + if (qf_init_ext(qi, NULL, buf, NULL, p_efm, buffer_cmd, + eap->line1, eap->line2) > 0 + && buffer_cmd) + qf_jump(qi, 0, 0, eap->forceit); /* display first error */ + } } } @@ -3673,8 +3680,7 @@ ex_helpgrep(eap) if (eap->cmdidx == CMD_lhelpgrep) { /* If the help window is not opened or if it already points to the - * correct location list, then free the new location list - */ + * correct location list, then free the new location list. */ if (!curwin->w_buffer->b_help || curwin->w_llist == qi) { if (new_qi) |