summaryrefslogtreecommitdiffstats
path: root/src/testdir/test_arglist.vim
diff options
context:
space:
mode:
authorBram Moolenaar <Bram@vim.org>2018-04-24 21:58:51 +0200
committerBram Moolenaar <Bram@vim.org>2018-04-24 21:58:51 +0200
commit46a53dfc29689c6a0d80e3820e8b0a48dba6b6ec (patch)
tree5ad1a9ee29f54608ea20a0a77581bf21f760d770 /src/testdir/test_arglist.vim
parentb255b90503a986931904c23dafb5b6d4e512a17e (diff)
patch 8.0.1763: :argedit does not reuse an empty unnamed bufferv8.0.1763
Problem: :argedit does not reuse an empty unnamed buffer. Solution: Add the BLN_CURBUF flag and fix all the side effects. (Christian Brabandt, closes #2713)
Diffstat (limited to 'src/testdir/test_arglist.vim')
-rw-r--r--src/testdir/test_arglist.vim12
1 files changed, 12 insertions, 0 deletions
diff --git a/src/testdir/test_arglist.vim b/src/testdir/test_arglist.vim
index 4b8d762e97..87bda700d1 100644
--- a/src/testdir/test_arglist.vim
+++ b/src/testdir/test_arglist.vim
@@ -308,6 +308,18 @@ func Test_argedit()
%argd
bwipe! C
bwipe! D
+
+ " :argedit reuses the current buffer if it is empty
+ %argd
+ " make sure to use a new buffer number for x when it is loaded
+ bw! x
+ new
+ let a = bufnr('')
+ argedit x
+ call assert_equal(a, bufnr(''))
+ call assert_equal('x', bufname(''))
+ %argd
+ bw! x
endfunc
" Test for the :argdelete command