summaryrefslogtreecommitdiff
path: root/src/ex_cmds2.c
diff options
context:
space:
mode:
authorBram Moolenaar <Bram@vim.org>2016-01-23 23:02:34 +0100
committerBram Moolenaar <Bram@vim.org>2016-01-23 23:02:34 +0100
commit2faa29f896252073b53f387406109e331fbbe5f8 (patch)
treeb6a11b3de6950ea9c623656b0a5765173026f281 /src/ex_cmds2.c
parentbd4593ffb170230504500ddedabad3fad1f31291 (diff)
downloadvim-git-2faa29f896252073b53f387406109e331fbbe5f8.tar.gz
patch 7.4.1161v7.4.1161
Problem: ":argadd" without argument is supposed to add the current buffer name to the arglist. Solution: Make it work as documented. (Coot, closes #577)
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)