]> granicus.if.org Git - vim/commitdiff
patch 8.1.0651: :args \"foo works like :args without argument v8.1.0651
authorBram Moolenaar <Bram@vim.org>
Fri, 28 Dec 2018 18:06:47 +0000 (19:06 +0100)
committerBram Moolenaar <Bram@vim.org>
Fri, 28 Dec 2018 18:06:47 +0000 (19:06 +0100)
Problem:    :args \"foo works like :args without argument.
Solution:   Fix check for empty argument. (closes #3728)

src/ex_cmds2.c
src/testdir/test_arglist.vim
src/version.c

index c3f26b64c5738e97ee491db21328b9c23549e844..74d56427cd2a8e324ac40bedaa869e9f063b3c39 100644 (file)
@@ -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"
index cb1117eede023a057256514265cb26e080c3ce39..72e727ff3f44116fd0a4b59bc6cadae5dc955502 100644 (file)
@@ -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()
index cbb0e70eaebcf5c71d61bad3b636e7cfeb916c5a..3082c0d12ef86b4d24af09e565cbf4536defe5b6 100644 (file)
@@ -799,6 +799,8 @@ static char *(features[]) =
 
 static int included_patches[] =
 {   /* Add new patch number below this line */
+/**/
+    651,
 /**/
     650,
 /**/