aboutsummaryrefslogtreecommitdiff
path: root/runtime
diff options
context:
space:
mode:
authorJan Edmund Lazo <jan.lazo@mail.utoronto.ca>2021-01-03 15:33:21 -0500
committerGitHub <noreply@github.com>2021-01-03 15:33:21 -0500
commita1ed941a7881122fda2fd48e71e890ed55e4d08e (patch)
tree8fc3e1fcdf98861d8f6ca0c59de55814e6a73d79 /runtime
parentfff4facdc47a0c8d088256af4d07c792b38b4a03 (diff)
downloadrneovim-a1ed941a7881122fda2fd48e71e890ed55e4d08e.tar.gz
rneovim-a1ed941a7881122fda2fd48e71e890ed55e4d08e.tar.bz2
rneovim-a1ed941a7881122fda2fd48e71e890ed55e4d08e.zip
vim-patch:8.2.0861: cannot easily get all the current marks (#13676)
Problem: Cannot easily get all the current marks. Solution: Add getmarklist(). (Yegappan Lakshmanan, closes #6032) https://github.com/vim/vim/commit/cfb4b47de08e4437c692d382067dc1692cd83c23 Cherry-pick the column number fix from patch v8.2.0871 because patch v8.2.0871 cannot be fully ported without the method patches. Co-authored-by: Peter Wolf <pwolf2310@gmail.com>
Diffstat (limited to 'runtime')
-rw-r--r--runtime/doc/eval.txt19
-rw-r--r--runtime/doc/usr_41.txt1
2 files changed, 20 insertions, 0 deletions
diff --git a/runtime/doc/eval.txt b/runtime/doc/eval.txt
index d04f52de0b..2d433a6d7a 100644
--- a/runtime/doc/eval.txt
+++ b/runtime/doc/eval.txt
@@ -2184,6 +2184,7 @@ getjumplist([{winnr} [, {tabnr}]])
getline({lnum}) String line {lnum} of current buffer
getline({lnum}, {end}) List lines {lnum} to {end} of current buffer
getloclist({nr} [, {what}]) List list of location list items
+getmarklist([{expr}]) List list of global/local marks
getmatches([{win}]) List list of current matches
getpid() Number process ID of Vim
getpos({expr}) List position of cursor, mark, etc.
@@ -4649,6 +4650,24 @@ getloclist({nr},[, {what}]) *getloclist()*
field is applicable only when called from a location list
window. See |location-list-file-window| for more details.
+getmarklist([{expr}] *getmarklist()*
+ Without the {expr} argument returns a |List| with information
+ about all the global marks. |mark|
+
+ If the optional {expr} argument is specified, returns the
+ local marks defined in buffer {expr}. For the use of {expr},
+ see |bufname()|.
+
+ Each item in the retuned List is a |Dict| with the following:
+ name - name of the mark prefixed by "'"
+ pos - a |List| with the position of the mark:
+ [bufnum, lnum, col, off]
+ Refer to |getpos()| for more information.
+ file - file name
+
+ Refer to |getpos()| for getting information about a specific
+ mark.
+
getmatches([{win}]) *getmatches()*
Returns a |List| with all matches previously defined for the
current window by |matchadd()| and the |:match| commands.
diff --git a/runtime/doc/usr_41.txt b/runtime/doc/usr_41.txt
index 31da51bfbe..e92e464c6a 100644
--- a/runtime/doc/usr_41.txt
+++ b/runtime/doc/usr_41.txt
@@ -723,6 +723,7 @@ Cursor and mark position: *cursor-functions* *mark-functions*
getcurpos() get position of the cursor
getpos() get position of cursor, mark, etc.
setpos() set position of cursor, mark, etc.
+ getmarklist() list of global/local marks
byte2line() get line number at a specific byte count
line2byte() byte count at a specific line
diff_filler() get the number of filler lines above a line