From 4efcb72bb758ce93e86fa3ef520e009d01d4891b Mon Sep 17 00:00:00 2001 From: Sean Dewar Date: Sun, 31 Oct 2021 16:41:39 +0000 Subject: feat(eval/method): partially port v8.1.1993 Problem: More functions can be used as methods. Solution: Make various functions usable as a method. https://github.com/vim/vim/commit/196b4664432f932625cfb6371dc42c24efe6c203 server2client requires +clientserver, which hasn't been ported yet. The eval.txt docs and test_clientserver.vim tests for server2client already exist, so include those changes. test_bufline.vim: Test for setbufline requires v8.1.1189 (which was reverted in #10848). --- src/nvim/testdir/test_cursor_func.vim | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/nvim/testdir/test_cursor_func.vim') diff --git a/src/nvim/testdir/test_cursor_func.vim b/src/nvim/testdir/test_cursor_func.vim index 46847e0663..a2482d95c4 100644 --- a/src/nvim/testdir/test_cursor_func.vim +++ b/src/nvim/testdir/test_cursor_func.vim @@ -86,7 +86,7 @@ func Test_screenpos() call assert_equal({'row': winrow, \ 'col': wincol + 13, \ 'curscol': wincol + 13, - \ 'endcol': wincol + 13}, screenpos(winid, 1, 7)) + \ 'endcol': wincol + 13}, winid->screenpos(1, 7)) call assert_equal({'row': winrow + 2, \ 'col': wincol + 1, \ 'curscol': wincol + 1, -- cgit From 2ee0bc09d9becd71ca864b4d754b63b152d1ce5b Mon Sep 17 00:00:00 2001 From: Sean Dewar Date: Sun, 31 Oct 2021 18:10:46 +0000 Subject: 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). --- src/nvim/testdir/test_cursor_func.vim | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/nvim/testdir/test_cursor_func.vim') diff --git a/src/nvim/testdir/test_cursor_func.vim b/src/nvim/testdir/test_cursor_func.vim index a2482d95c4..d96a35ef53 100644 --- a/src/nvim/testdir/test_cursor_func.vim +++ b/src/nvim/testdir/test_cursor_func.vim @@ -37,7 +37,7 @@ endfunc " Very short version of what matchparen does. function s:Highlight_Matching_Pair() let save_cursor = getcurpos() - call setpos('.', save_cursor) + eval save_cursor->setpos('.') endfunc func Test_curswant_with_autocommand() -- cgit From 2ad92e947650cc502952b3ec23a23f9862f3a76d Mon Sep 17 00:00:00 2001 From: Sean Dewar Date: Mon, 1 Nov 2021 16:26:19 +0000 Subject: vim-patch:8.1.2013: more functions can be used as methods Problem: More functions can be used as methods. Solution: Make various functions usable as a method. https://github.com/vim/vim/commit/f92e58cadb03156879e9bdbf6341bf662d9c87cc Cherry-pick s:normalize_fname for tolower test from v8.1.0894 and v8.1.1417 (even though it is unused for now). Fix header for win_id2tabwin in eval.txt. --- src/nvim/testdir/test_cursor_func.vim | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/nvim/testdir/test_cursor_func.vim') diff --git a/src/nvim/testdir/test_cursor_func.vim b/src/nvim/testdir/test_cursor_func.vim index d96a35ef53..e8c4a952ee 100644 --- a/src/nvim/testdir/test_cursor_func.vim +++ b/src/nvim/testdir/test_cursor_func.vim @@ -82,7 +82,7 @@ func Test_screenpos() call assert_equal({'row': winrow, \ 'col': wincol + 0, \ 'curscol': wincol + 7, - \ 'endcol': wincol + 7}, screenpos(winid, 1, 1)) + \ 'endcol': wincol + 7}, winid->screenpos(1, 1)) call assert_equal({'row': winrow, \ 'col': wincol + 13, \ 'curscol': wincol + 13, -- cgit