mirror of
https://github.com/neovim/neovim.git
synced 2025-02-25 18:55:25 -06:00
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:
parent
60f0e18588
commit
6bc9af43ce
@ -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.
|
||||
|
@ -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={},
|
||||
|
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user