1
0
forked from aniani/vim

patch 8.1.1924: using empty string for current buffer is unexpected

Problem:    Using empty string for current buffer is unexpected.
Solution:   Make the argument optional for bufname() and bufnr().
This commit is contained in:
Bram Moolenaar
2019-08-24 22:14:58 +02:00
parent 4119309d70
commit a8eee21e75
4 changed files with 37 additions and 24 deletions

View File

@@ -398,10 +398,10 @@ func Test_argedit()
" make sure to use a new buffer number for x when it is loaded
bw! x
new
let a = bufnr('')
let a = bufnr()
argedit x
call assert_equal(a, bufnr(''))
call assert_equal('x', bufname(''))
call assert_equal(a, bufnr())
call assert_equal('x', bufname())
%argd
bw! x
endfunc