From 8e408c95fe2a79f8dff6672e4ada77c972457a6a Mon Sep 17 00:00:00 2001 From: Jan Edmund Lazo Date: Thu, 3 Jan 2019 00:59:58 -0500 Subject: vim-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 vim/vim#3728) https://github.com/vim/vim/commit/2ac372ccee1af6f9fa105bf2648d5e4efa554236 --- src/nvim/ex_cmds2.c | 2 +- src/nvim/testdir/test_arglist.vim | 6 ++++++ 2 files changed, 7 insertions(+), 1 deletion(-) 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..320ff20b27 100644 --- a/src/nvim/testdir/test_arglist.vim +++ b/src/nvim/testdir/test_arglist.vim @@ -170,6 +170,12 @@ func Test_argument() call assert_fails('argument', 'E163:') 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() -- cgit From 111e46582cfc24e490fe42457c6b56aac8306ad2 Mon Sep 17 00:00:00 2001 From: Jan Edmund Lazo Date: Thu, 3 Jan 2019 01:07:11 -0500 Subject: vim-patch:8.1.0653: arglist test fails on MS-windows Problem: Arglist test fails on MS-windows. Solution: Only use a file name with a double quote on Unix. https://github.com/vim/vim/commit/3de8c2d1f027410db6a06f0fcd3355d96c8b8596 --- src/nvim/testdir/test_arglist.vim | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/src/nvim/testdir/test_arglist.vim b/src/nvim/testdir/test_arglist.vim index 320ff20b27..368fc9810d 100644 --- a/src/nvim/testdir/test_arglist.vim +++ b/src/nvim/testdir/test_arglist.vim @@ -171,9 +171,12 @@ func Test_argument() endfunc func Test_args_with_quote() - args \"foobar - call assert_equal('"foobar', argv(0)) - %argdelete + " 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 -- cgit