The attached patch adds support for the following commands:
:cfile, :cgetfile, :caddfile, :lfile, :lgetfile, and :laddfile
as arguments to :browse.

Additionally, the patch unlocks support for ":browse sview" and updates
documentation for :browse.

-- 
Cheers,
Lech

--~--~---------~--~----~------------~-------~--~----~
You received this message from the "vim_dev" maillist.
For more information, visit http://www.vim.org/maillist.php
-~----------~----~----~----~------~----~------~--~---

diff --git a/runtime/doc/editing.txt b/runtime/doc/editing.txt
index e6b7342..9b31012 100644
--- a/runtime/doc/editing.txt
+++ b/runtime/doc/editing.txt
@@ -1171,14 +1171,21 @@ If you want to always use ":confirm", set the 'confirm' option.
 			*:browse* *:bro* *E338* *E614* *E615* *E616* *E578*
 :bro[wse] {command}	Open a file selection dialog for an argument to
 			{command}.  At present this works for |:e|, |:w|,
-			|:r|, |:saveas|, |:sp|, |:mkexrc|, |:mkvimrc|,
-			|:mksession|, |:split|, |:vsplit|, and |:tabe|.
+			|:wall|, |:wq|, |:wqall|, |:x|, |:xall|, |:exit|,
+			|:view|, |:sview|, |:r|, |:saveas|, |:sp|, |:mkexrc|,
+			|:mkvimrc|, |:mksession|, |:mkview|, |:split|,
+			|:vsplit|, |:tabe|, |:tabnew|, |:cfile|, |:cgetfile|,
+			|:caddfile|, |:lfile|, |:lgetfile|, |:laddfile|,
+			|:diffsplit|, |:diffpatch|, |:open|, |:pedit|,
+			|:redir|, |:source|, |:update|, |:visual|, |:vsplit|,
+			and |:qall| if 'confirm' is set.
 			{only in Win32, Athena, Motif, GTK and Mac GUI}
 			When ":browse" is not possible you get an error
 			message.  If the |+browse| feature is missing or the
 			{command} doesn't support browsing, the {command} is
 			executed without a dialog.
 			":browse set" works like |:options|.
+			See also |:oldfiles| for ":browse oldfiles".
 
 The syntax is best shown via some examples: >
 	:browse e $vim/foo
diff --git a/src/ex_cmds.h b/src/ex_cmds.h
index bf66b40..f66a8a6 100644
--- a/src/ex_cmds.h
+++ b/src/ex_cmds.h
@@ -896,7 +896,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),
+			RANGE|NOTADR|BANG|FILE1|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 5fc36bc..5e2c09a 100644
--- a/src/quickfix.c
+++ b/src/quickfix.c
@@ -2957,6 +2957,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);
 

Raspunde prin e-mail lui