mirror of
https://github.com/neovim/neovim.git
synced 2025-09-06 11:28:22 +00:00
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)
2ac372ccee
This commit is contained in:
@@ -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"
|
// ":args file ..": define new argument list, handle like ":next"
|
||||||
// Also for ":argslocal file .." and ":argsglobal file ..".
|
// Also for ":argslocal file .." and ":argsglobal file ..".
|
||||||
ex_next(eap);
|
ex_next(eap);
|
||||||
|
@@ -170,6 +170,12 @@ func Test_argument()
|
|||||||
call assert_fails('argument', 'E163:')
|
call assert_fails('argument', 'E163:')
|
||||||
endfunc
|
endfunc
|
||||||
|
|
||||||
|
func Test_args_with_quote()
|
||||||
|
args \"foobar
|
||||||
|
call assert_equal('"foobar', argv(0))
|
||||||
|
%argdelete
|
||||||
|
endfunc
|
||||||
|
|
||||||
" Test for 0argadd and 0argedit
|
" Test for 0argadd and 0argedit
|
||||||
" Ported from the test_argument_0count.in test script
|
" Ported from the test_argument_0count.in test script
|
||||||
func Test_zero_argadd()
|
func Test_zero_argadd()
|
||||||
|
Reference in New Issue
Block a user