patch 8.0.0721: :argedit can only have one argument
Problem: :argedit can only have one argument.
Solution: Allow for multiple arguments. (Christian Brabandt)
diff --git a/src/testdir/test_arglist.vim b/src/testdir/test_arglist.vim
index dee2d65..1a0e4af 100644
--- a/src/testdir/test_arglist.vim
+++ b/src/testdir/test_arglist.vim
@@ -188,6 +188,11 @@
2argu
arga third
call assert_equal(['edited', 'a', 'third', 'b', 'c', 'd'], argv())
+
+ 2argu
+ argedit file\ with\ spaces another file
+ call assert_equal(['edited', 'a', 'file with spaces', 'another', 'file', 'third', 'b', 'c', 'd'], argv())
+ call assert_equal('file with spaces', expand('%'))
endfunc
func Reset_arglist()
@@ -239,20 +244,19 @@
call assert_equal(['a', 'b'], argv())
call assert_equal('b', expand('%:t'))
argedit a
- call assert_equal(['a', 'b'], argv())
+ call assert_equal(['a', 'b', 'a'], argv())
call assert_equal('a', expand('%:t'))
- if has('unix')
- " on MS-Windows this would edit file "a b"
- call assert_fails('argedit a b', 'E172:')
- endif
+ argedit C D
+ call assert_equal('C', expand('%:t'))
+ call assert_equal(['a', 'b', 'a', 'C', 'D'], argv())
argedit c
- call assert_equal(['a', 'c', 'b'], argv())
+ call assert_equal(['a', 'b', 'a', 'C', 'c', 'D'], argv())
0argedit x
- call assert_equal(['x', 'a', 'c', 'b'], argv())
+ call assert_equal(['x', 'a', 'b', 'a', 'C', 'c', 'D'], argv())
enew! | set modified
call assert_fails('argedit y', 'E37:')
argedit! y
- call assert_equal(['x', 'y', 'a', 'c', 'b'], argv())
+ call assert_equal(['x', 'y', 'y', 'a', 'b', 'a', 'C', 'c', 'D'], argv())
%argd
endfunc