Mercurial > vim
changeset 2782:0a0d7961b4fe v7.3.167
updated for version 7.3.167
Problem: When using the internal grep QuickFixCmdPost is not triggered.
(Yukihiro Nakadaira)
Solution: Change the place where autocommands are triggered.
author | Bram Moolenaar <bram@vim.org> |
---|---|
date | Thu, 28 Apr 2011 17:27:09 +0200 |
parents | 35c561d1583a |
children | 112b9fef74be |
files | src/quickfix.c src/version.c |
diffstat | 2 files changed, 16 insertions(+), 10 deletions(-) [+] |
line wrap: on
line diff
--- a/src/quickfix.c +++ b/src/quickfix.c @@ -2742,6 +2742,13 @@ ex_make(eap) #ifdef FEAT_AUTOCMD char_u *au_name = NULL; + /* Redirect ":grep" to ":vimgrep" if 'grepprg' is "internal". */ + if (grep_internal(eap->cmdidx)) + { + ex_vimgrep(eap); + return; + } + switch (eap->cmdidx) { case CMD_make: au_name = (char_u *)"make"; break; @@ -2763,13 +2770,6 @@ ex_make(eap) } #endif - /* Redirect ":grep" to ":vimgrep" if 'grepprg' is "internal". */ - if (grep_internal(eap->cmdidx)) - { - ex_vimgrep(eap); - return; - } - if (eap->cmdidx == CMD_lmake || eap->cmdidx == CMD_lgrep || eap->cmdidx == CMD_lgrepadd) wp = curwin; @@ -3057,10 +3057,14 @@ ex_vimgrep(eap) switch (eap->cmdidx) { - case CMD_vimgrep: au_name = (char_u *)"vimgrep"; break; - case CMD_lvimgrep: au_name = (char_u *)"lvimgrep"; break; - case CMD_vimgrepadd: au_name = (char_u *)"vimgrepadd"; break; + case CMD_vimgrep: au_name = (char_u *)"vimgrep"; break; + case CMD_lvimgrep: au_name = (char_u *)"lvimgrep"; break; + case CMD_vimgrepadd: au_name = (char_u *)"vimgrepadd"; break; case CMD_lvimgrepadd: au_name = (char_u *)"lvimgrepadd"; 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)