From 2ac372ccee1af6f9fa105bf2648d5e4efa554236 Mon Sep 17 00:00:00 2001 From: Bram Moolenaar Date: Fri, 28 Dec 2018 19:06:47 +0100 Subject: [PATCH] patch 8.1.0651: :args \"foo works like :args without argument Problem: :args \"foo works like :args without argument. Solution: Fix check for empty argument. (closes #3728) --- src/ex_cmds2.c | 2 +- src/testdir/test_arglist.vim | 6 ++++++ src/version.c | 2 ++ 3 files changed, 9 insertions(+), 1 deletion(-) diff --git a/src/ex_cmds2.c b/src/ex_cmds2.c index c3f26b64c..74d56427c 100644 --- a/src/ex_cmds2.c +++ b/src/ex_cmds2.c @@ -2738,7 +2738,7 @@ ex_args(exarg_T *eap) alist_new(); } - if (!ends_excmd(*eap->arg)) + if (*eap->arg != NUL) { /* * ":args file ..": define new argument list, handle like ":next" diff --git a/src/testdir/test_arglist.vim b/src/testdir/test_arglist.vim index cb1117eed..72e727ff3 100644 --- a/src/testdir/test_arglist.vim +++ b/src/testdir/test_arglist.vim @@ -217,6 +217,12 @@ func Test_list_arguments() %argdelete endfunc +func Test_args_with_quote() + args \"foobar + call assert_equal('"foobar', argv(0)) + %argdelete +endfunc + " Test for 0argadd and 0argedit " Ported from the test_argument_0count.in test script func Test_zero_argadd() diff --git a/src/version.c b/src/version.c index cbb0e70ea..3082c0d12 100644 --- a/src/version.c +++ b/src/version.c @@ -799,6 +799,8 @@ static char *(features[]) = static int included_patches[] = { /* Add new patch number below this line */ +/**/ + 651, /**/ 650, /**/ -- 2.50.1