diff options
author | Jurica Bradaric <jbradaric@gmail.com> | 2016-05-14 15:51:44 +0200 |
---|---|---|
committer | Jurica Bradaric <jbradaric@gmail.com> | 2016-05-14 15:57:50 +0200 |
commit | 055c9e1be6d73fa4a4f84299dbdbcaf8e2db140a (patch) | |
tree | 348886503a9e7cdb2411d3a30ea0788b39ef47d3 /src/nvim/ex_cmds2.c | |
parent | 02fb6ee45843ac0b759f5bb15bbb3f3f418f0e74 (diff) | |
download | rneovim-055c9e1be6d73fa4a4f84299dbdbcaf8e2db140a.tar.gz rneovim-055c9e1be6d73fa4a4f84299dbdbcaf8e2db140a.tar.bz2 rneovim-055c9e1be6d73fa4a4f84299dbdbcaf8e2db140a.zip |
vim-patch:7.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 vim/vim#577)
https://github.com/vim/vim/commit/2faa29f896252073b53f387406109e331fbbe5f8
Diffstat (limited to 'src/nvim/ex_cmds2.c')
-rw-r--r-- | src/nvim/ex_cmds2.c | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/src/nvim/ex_cmds2.c b/src/nvim/ex_cmds2.c index b6d0ef78cf..fd299eaa8a 100644 --- a/src/nvim/ex_cmds2.c +++ b/src/nvim/ex_cmds2.c @@ -1487,9 +1487,15 @@ do_arglist ( char_u *p; int match; - /* - * Collect all file name arguments in "new_ga". - */ + // 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". get_arglist(&new_ga, str); if (what == AL_DEL) { |