diff options
| author | Sean Dewar <seandewar@users.noreply.github.com> | 2021-10-31 18:10:46 +0000 |
|---|---|---|
| committer | Sean Dewar <seandewar@users.noreply.github.com> | 2021-11-26 18:52:58 +0000 |
| commit | 2ee0bc09d9becd71ca864b4d754b63b152d1ce5b (patch) | |
| tree | 0cef8da1a6dba83e4d2272cec4ba162fcdc8b770 /src/nvim/testdir/test_tabpage.vim | |
| parent | aad25ae4fc3fdfdf2c23009406cf3f806a2c272d (diff) | |
| download | rneovim-2ee0bc09d9becd71ca864b4d754b63b152d1ce5b.tar.gz rneovim-2ee0bc09d9becd71ca864b4d754b63b152d1ce5b.tar.bz2 rneovim-2ee0bc09d9becd71ca864b4d754b63b152d1ce5b.zip | |
feat(eval/method): partially port v8.1.1996
Problem: More functions can be used as methods.
Solution: Make various functions usable as a method.
https://github.com/vim/vim/commit/aad222c9c9a1e4fe6ae5a1fe95bb084619be0e65
Partial port as this does not include eval.txt change for listener_add.
Cherry-pick eval.txt changes for:
- bufadd from v8.1.1626:
https://github.com/vim/vim/commit/5ca1ac373ae62b37152cb6f85916b402eda520a5
- setloclist and setqflist headers from:
https://github.com/vim/vim/commit/b0d45e7f5354375edd02afafde3bd37dac1515ff
Correct eval.txt typo for settabwinvar method call (matches latest Vim).
Diffstat (limited to 'src/nvim/testdir/test_tabpage.vim')
| -rw-r--r-- | src/nvim/testdir/test_tabpage.vim | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/nvim/testdir/test_tabpage.vim b/src/nvim/testdir/test_tabpage.vim index b261b96c3b..9869dc7590 100644 --- a/src/nvim/testdir/test_tabpage.vim +++ b/src/nvim/testdir/test_tabpage.vim @@ -35,7 +35,7 @@ function Test_tabpage() tabnew tabfirst call settabvar(2, 'val_num', 100) - call settabvar(2, 'val_str', 'SetTabVar test') + eval 'SetTabVar test'->settabvar(2, 'val_str') call settabvar(2, 'val_list', ['red', 'blue', 'green']) " call assert_true(gettabvar(2, 'val_num') == 100 && gettabvar(2, 'val_str') == 'SetTabVar test' && gettabvar(2, 'val_list') == ['red', 'blue', 'green']) @@ -184,7 +184,7 @@ function Test_tabpage_with_autocmd() let s:li = split(join(map(copy(winr), 'gettabwinvar('.tabn.', v:val, "a")')), '\s\+') call assert_equal(['a', 'a'], s:li) let s:li = [] - C call map(copy(winr), 'settabwinvar('.tabn.', v:val, ''a'', v:val*2)') + C call map(copy(winr), '(v:val*2)->settabwinvar(' .. tabn .. ', v:val, ''a'')') let s:li = split(join(map(copy(winr), 'gettabwinvar('.tabn.', v:val, "a")')), '\s\+') call assert_equal(['2', '4'], s:li) |