comparison src/quickfix.c @ 3404:38a135730423 v7.3.468

updated for version 7.3.468 Problem: For some compilers the error file is not easily readable. Solution: Use QuickFixCmdPre for more commands. (Marcin Szamotulski)
author Bram Moolenaar <bram@vim.org>
date Wed, 07 Mar 2012 20:13:49 +0100
parents 9ccdc4a69d8f
children 8101253704f6
comparison
equal deleted inserted replaced
3403:214ea47cc322 3404:38a135730423
2993 ex_cfile(eap) 2993 ex_cfile(eap)
2994 exarg_T *eap; 2994 exarg_T *eap;
2995 { 2995 {
2996 win_T *wp = NULL; 2996 win_T *wp = NULL;
2997 qf_info_T *qi = &ql_info; 2997 qf_info_T *qi = &ql_info;
2998 #ifdef FEAT_AUTOCMD
2999 char_u *au_name = NULL;
3000 #endif
2998 3001
2999 if (eap->cmdidx == CMD_lfile || eap->cmdidx == CMD_lgetfile 3002 if (eap->cmdidx == CMD_lfile || eap->cmdidx == CMD_lgetfile
3000 || eap->cmdidx == CMD_laddfile) 3003 || eap->cmdidx == CMD_laddfile)
3001 wp = curwin; 3004 wp = curwin;
3002 3005
3006 #ifdef FEAT_AUTOCMD
3007 switch (eap->cmdidx)
3008 {
3009 case CMD_cfile: au_name = (char_u *)"cfile"; break;
3010 case CMD_cgetfile: au_name = (char_u *)"cgetfile"; break;
3011 case CMD_caddfile: au_name = (char_u *)"caddfile"; break;
3012 case CMD_lfile: au_name = (char_u *)"lfile"; break;
3013 case CMD_lgetfile: au_name = (char_u *)"lgetfile"; break;
3014 case CMD_laddfile: au_name = (char_u *)"laddfile"; break;
3015 default: break;
3016 }
3017 if (au_name != NULL)
3018 apply_autocmds(EVENT_QUICKFIXCMDPRE, au_name, NULL, FALSE, curbuf);
3019 #endif
3003 #ifdef FEAT_BROWSE 3020 #ifdef FEAT_BROWSE
3004 if (cmdmod.browse) 3021 if (cmdmod.browse)
3005 { 3022 {
3006 char_u *browse_file = do_browse(0, (char_u *)_("Error file"), eap->arg, 3023 char_u *browse_file = do_browse(0, (char_u *)_("Error file"), eap->arg,
3007 NULL, NULL, BROWSE_FILTER_ALL_FILES, NULL); 3024 NULL, NULL, BROWSE_FILTER_ALL_FILES, NULL);
3029 && eap->cmdidx != CMD_laddfile), 3046 && eap->cmdidx != CMD_laddfile),
3030 *eap->cmdlinep) > 0 3047 *eap->cmdlinep) > 0
3031 && (eap->cmdidx == CMD_cfile 3048 && (eap->cmdidx == CMD_cfile
3032 || eap->cmdidx == CMD_lfile)) 3049 || eap->cmdidx == CMD_lfile))
3033 { 3050 {
3051 #ifdef FEAT_AUTOCMD
3052 if (au_name != NULL)
3053 apply_autocmds(EVENT_QUICKFIXCMDPOST, au_name, NULL, FALSE, curbuf);
3054 #endif
3034 if (wp != NULL) 3055 if (wp != NULL)
3035 qi = GET_LOC_LIST(wp); 3056 qi = GET_LOC_LIST(wp);
3036 qf_jump(qi, 0, 0, eap->forceit); /* display first error */ 3057 qf_jump(qi, 0, 0, eap->forceit); /* display first error */
3058 }
3059
3060 else
3061 {
3062 #ifdef FEAT_AUTOCMD
3063 if (au_name != NULL)
3064 apply_autocmds(EVENT_QUICKFIXCMDPOST, au_name, NULL, FALSE, curbuf);
3065 #endif
3037 } 3066 }
3038 } 3067 }
3039 3068
3040 /* 3069 /*
3041 * ":vimgrep {pattern} file(s)" 3070 * ":vimgrep {pattern} file(s)"