feat(eval/method): partially port v8.1.1996

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

Partial port as this does not include eval.txt change for listener_add.

Cherry-pick eval.txt changes for:
- bufadd from v8.1.1626:
  5ca1ac373a
- setloclist and setqflist headers from:
  b0d45e7f53

Correct eval.txt typo for settabwinvar method call (matches latest Vim).
This commit is contained in:
Sean Dewar
2021-10-31 18:10:46 +00:00
parent aad25ae4fc
commit 2ee0bc09d9
12 changed files with 71 additions and 32 deletions

View File

@@ -811,7 +811,7 @@ func Test_locationlist()
" NOTE: problem 1:
" intentionally not setting 'lnum' so that the quickfix entries are not
" valid
call setloclist(0, qflist, ' ')
eval qflist->setloclist(0, ' ')
endfor
" Test A
@@ -1699,7 +1699,7 @@ endfunc
func Test_setqflist_invalid_nr()
" The following command used to crash Vim
call setqflist([], ' ', {'nr' : $XXX_DOES_NOT_EXIST})
eval []->setqflist(' ', {'nr' : $XXX_DOES_NOT_EXIST})
endfunc
func Test_setqflist_user_sets_buftype()