diff options
author | Bram Moolenaar <Bram@vim.org> | 2010-07-11 16:58:51 +0200 |
---|---|---|
committer | Bram Moolenaar <Bram@vim.org> | 2010-07-11 16:58:51 +0200 |
commit | 9028b10dfe3a00e505bf1b720f515dab91913b5e (patch) | |
tree | 637b3f40fd0c18f01fd682273e266f8fe2c3507f /src | |
parent | 7e6d3bd3da555e151ba518081a964a0cdb39ac33 (diff) | |
download | vim-9028b10dfe3a00e505bf1b720f515dab91913b5e.zip |
Support :browse for commands that use an error file argument. (Lech Lorens)
Diffstat (limited to 'src')
-rw-r--r-- | src/ex_cmds.h | 2 | ||||
-rw-r--r-- | src/quickfix.c | 12 |
2 files changed, 13 insertions, 1 deletions
diff --git a/src/ex_cmds.h b/src/ex_cmds.h index 4e0e16918..52f1cbc23 100644 --- a/src/ex_cmds.h +++ b/src/ex_cmds.h @@ -904,7 +904,7 @@ EX(CMD_sunmenu, "sunmenu", ex_menu, EX(CMD_suspend, "suspend", ex_stop, TRLBAR|BANG|CMDWIN), EX(CMD_sview, "sview", ex_splitview, - NEEDARG|RANGE|NOTADR|BANG|FILE1|EDITCMD|ARGOPT|TRLBAR), + BANG|FILE1|RANGE|NOTADR|EDITCMD|ARGOPT|TRLBAR), EX(CMD_swapname, "swapname", ex_swapname, TRLBAR|CMDWIN), EX(CMD_syntax, "syntax", ex_syntax, 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); |