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)
f17e7ea67a

The rest of this patch was ported in:
a1ed941a78
This commit is contained in:
Sean Dewar 2021-11-01 17:49:43 +00:00
parent 60f0e18588
commit 6bc9af43ce
No known key found for this signature in database
GPG Key ID: 08CC2C83AD41B581
3 changed files with 6 additions and 3 deletions

View File

@ -5203,6 +5203,9 @@ getmarklist([{buf}]) *getmarklist()*
Refer to |getpos()| for getting information about a specific
mark.
Can also be used as a |method|: >
GetBufnr()->getmarklist()
getmatches([{win}]) *getmatches()*
Returns a |List| with all matches previously defined for the
current window by |matchadd()| and the |:match| commands.

View File

@ -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={},

View File

@ -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