From 9028b10dfe3a00e505bf1b720f515dab91913b5e Mon Sep 17 00:00:00 2001 From: Bram Moolenaar Date: Sun, 11 Jul 2010 16:58:51 +0200 Subject: Support :browse for commands that use an error file argument. (Lech Lorens) --- src/quickfix.c | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'src/quickfix.c') diff --git a/src/quickfix.c b/src/quickfix.c index 8fef225e9..c2543a124 100644 --- a/src/quickfix.c +++ b/src/quickfix.c @@ -2951,6 +2951,18 @@ ex_cfile(eap) || eap->cmdidx == CMD_laddfile) wp = curwin; +#ifdef FEAT_BROWSE + if (cmdmod.browse) + { + char_u *browse_file = do_browse(0, (char_u *)_("Error file"), eap->arg, + NULL, NULL, BROWSE_FILTER_ALL_FILES, NULL); + if (browse_file == NULL) + return; + set_string_option_direct((char_u *)"ef", -1, browse_file, OPT_FREE, 0); + vim_free(browse_file); + } + else +#endif if (*eap->arg != NUL) set_string_option_direct((char_u *)"ef", -1, eap->arg, OPT_FREE, 0); -- cgit v1.2.1