diff options
author | Sean Dewar <seandewar@users.noreply.github.com> | 2021-11-01 17:49:43 +0000 |
---|---|---|
committer | Sean Dewar <seandewar@users.noreply.github.com> | 2021-11-26 18:53:11 +0000 |
commit | 6bc9af43ceaf10992982369c74ac073072562068 (patch) | |
tree | 7868c2fc878cda6e9176af785ceb1ba0e3d85082 /src | |
parent | 60f0e1858870849fa5d6ed56ea40dc0183fab77d (diff) | |
download | rneovim-6bc9af43ceaf10992982369c74ac073072562068.tar.gz rneovim-6bc9af43ceaf10992982369c74ac073072562068.tar.bz2 rneovim-6bc9af43ceaf10992982369c74ac073072562068.zip |
vim-patch:8.2.0871: cannot use getmarklist() as a method
Problem: Cannot use getmarklist() as a method.
Solution: Make getmarklist() work as a method. Add one to the column
number to match getpos(). (Yegappan Lakshmanan, closes vim/vim#6176)
https://github.com/vim/vim/commit/f17e7ea67a798d0aa45ce24ea80c9e21d5164326
The rest of this patch was ported in:
https://github.com/neovim/neovim/commit/a1ed941a7881122fda2fd48e71e890ed55e4d08e
Diffstat (limited to 'src')
-rw-r--r-- | src/nvim/eval.lua | 2 | ||||
-rw-r--r-- | src/nvim/testdir/test_marks.vim | 4 |
2 files changed, 3 insertions, 3 deletions
diff --git a/src/nvim/eval.lua b/src/nvim/eval.lua index 161c0a4695..add1445f45 100644 --- a/src/nvim/eval.lua +++ b/src/nvim/eval.lua @@ -161,7 +161,7 @@ return { getjumplist={args={0, 2}, base=1}, getline={args={1, 2}, base=1}, getloclist={args={1, 2}}, - getmarklist={args={0, 1}}, + getmarklist={args={0, 1}, base=1}, getmatches={args={0, 1}}, getmousepos={}, getpid={}, diff --git a/src/nvim/testdir/test_marks.vim b/src/nvim/testdir/test_marks.vim index 2fd82a4b6d..b3035d73ce 100644 --- a/src/nvim/testdir/test_marks.vim +++ b/src/nvim/testdir/test_marks.vim @@ -227,7 +227,7 @@ func Test_getmarklist() call cursor(2, 2) normal mr call assert_equal({'mark' : "'r", 'pos' : [bufnr(), 2, 2, 0]}, - \ getmarklist(bufnr())[0]) - call assert_equal([], getmarklist({})) + \ bufnr()->getmarklist()[0]) + call assert_equal([], {}->getmarklist()) close! endfunc |