patch 8.1.0341: :argadd in empty buffer changes the buffer name
Problem: :argadd in empty buffer changes the buffer name. (Pavol Juhas)
Solution: Don't re-use the current buffer when not going to edit the file.
(closes #3397) Do re-use the current buffer for :next.
diff --git a/src/testdir/test_command_count.vim b/src/testdir/test_command_count.vim
index 7262789..55b2303 100644
--- a/src/testdir/test_command_count.vim
+++ b/src/testdir/test_command_count.vim
@@ -158,7 +158,9 @@
func Test_command_count_4()
%argd
let bufnr = bufnr('$')
- arga aa bb cc dd ee ff
+ next aa bb cc dd ee ff
+ call assert_equal(bufnr, bufnr('%'))
+
3argu
let args = []
.,$-argdo call add(args, expand('%'))