summaryrefslogtreecommitdiff
path: root/src/ex_cmds2.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/ex_cmds2.c')
-rw-r--r--src/ex_cmds2.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/src/ex_cmds2.c b/src/ex_cmds2.c
index 59bf94589..bc7193d12 100644
--- a/src/ex_cmds2.c
+++ b/src/ex_cmds2.c
@@ -2090,6 +2090,16 @@ do_arglist(str, what, after)
#endif
/*
+ * Set default argument for ":argadd" command.
+ */
+ if (what == AL_ADD && *str == NUL)
+ {
+ if (curbuf->b_ffname == NULL)
+ return FAIL;
+ str = curbuf->b_fname;
+ }
+
+ /*
* Collect all file name arguments in "new_ga".
*/
if (get_arglist(&new_ga, str) == FAIL)