vim-patch:8.1.1888: more functions can be used as methods

Problem:    More functions can be used as methods.
Solution:   Make various functions usable as a method.
073e4b92e6

test_popup.vim already has the changes from this patch (they're N/A
anyway).
This commit is contained in:
Sean Dewar
2021-08-07 17:06:08 +01:00
parent 41dbd3a2e0
commit 5fbc1a49c7
6 changed files with 53 additions and 22 deletions

View File

@@ -1414,12 +1414,12 @@ func Test_bufadd_bufload()
let curbuf = bufnr('')
call writefile(['some', 'text'], 'XotherName')
let buf = bufadd('XotherName')
let buf = 'XotherName'->bufadd()
call assert_notequal(0, buf)
call assert_equal(1, bufexists('XotherName'))
eval 'XotherName'->bufexists()->assert_equal(1)
call assert_equal(0, getbufvar(buf, '&buflisted'))
call assert_equal(0, bufloaded(buf))
call bufload(buf)
eval buf->bufload()
call assert_equal(1, bufloaded(buf))
call assert_equal(['some', 'text'], getbufline(buf, 1, '$'))
call assert_equal(curbuf, bufnr(''))