1
0
forked from aniani/vim

patch 8.1.0164: luaeval('vim.buffer().name') returns an error

Problem:    luaeval('vim.buffer().name') returns an error.
Solution:   Return an empty string. (Dominique Pelle, closes #3167)
This commit is contained in:
Bram Moolenaar
2018-07-07 23:07:41 +02:00
parent 2549acf794
commit fe08df452a
3 changed files with 8 additions and 7 deletions

View File

@@ -198,11 +198,8 @@ endfunc
" Test vim.buffer().name and vim.buffer().fname
func Test_buffer_name()
new
" FIXME: for an unnamed buffer, I would expect
" vim.buffer().name to give an empty string, but
" it returns 0. Is it a bug?
" so this assert_equal is commented out.
" call assert_equal('', luaeval('vim.buffer().name'))
call assert_equal('', luaeval('vim.buffer().name'))
call assert_equal('', luaeval('vim.buffer().fname'))
bwipe!
new Xfoo