diff options
author | Bram Moolenaar <Bram@vim.org> | 2016-01-23 23:02:34 +0100 |
---|---|---|
committer | Bram Moolenaar <Bram@vim.org> | 2016-01-23 23:02:34 +0100 |
commit | 2faa29f896252073b53f387406109e331fbbe5f8 (patch) | |
tree | b6a11b3de6950ea9c623656b0a5765173026f281 /src/ex_cmds2.c | |
parent | bd4593ffb170230504500ddedabad3fad1f31291 (diff) | |
download | vim-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.c | 10 |
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) |