aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/nvim/ex_cmds2.c2
-rw-r--r--src/nvim/testdir/test_arglist.vim9
2 files changed, 10 insertions, 1 deletions
diff --git a/src/nvim/ex_cmds2.c b/src/nvim/ex_cmds2.c
index 6b0d8801fd..484c911a8b 100644
--- a/src/nvim/ex_cmds2.c
+++ b/src/nvim/ex_cmds2.c
@@ -1772,7 +1772,7 @@ void ex_args(exarg_T *eap)
}
}
- if (!ends_excmd(*eap->arg)) {
+ if (*eap->arg != NUL) {
// ":args file ..": define new argument list, handle like ":next"
// Also for ":argslocal file .." and ":argsglobal file ..".
ex_next(eap);
diff --git a/src/nvim/testdir/test_arglist.vim b/src/nvim/testdir/test_arglist.vim
index 20171bb599..368fc9810d 100644
--- a/src/nvim/testdir/test_arglist.vim
+++ b/src/nvim/testdir/test_arglist.vim
@@ -170,6 +170,15 @@ func Test_argument()
call assert_fails('argument', 'E163:')
endfunc
+func Test_args_with_quote()
+ " Only on Unix can a file name include a double quote.
+ if has('unix')
+ args \"foobar
+ call assert_equal('"foobar', argv(0))
+ %argdelete
+ endif
+endfunc
+
" Test for 0argadd and 0argedit
" Ported from the test_argument_0count.in test script
func Test_zero_argadd()