1
0
forked from aniani/vim

patch 8.0.1497: getting the jump list requires parsing the output of :jumps

Problem:    Getting the jump list requires parsing the output of :jumps.
Solution:   Add getjumplist(). (Yegappan Lakshmanan, closes #2609)
This commit is contained in:
Bram Moolenaar
2018-02-10 21:06:32 +01:00
parent d23a823669
commit 4f50588ba3
9 changed files with 170 additions and 5 deletions

View File

@@ -1,4 +1,4 @@
*eval.txt* For Vim version 8.0. Last change: 2018 Feb 09
*eval.txt* For Vim version 8.0. Last change: 2018 Feb 10
VIM REFERENCE MANUAL by Bram Moolenaar
@@ -2167,6 +2167,8 @@ getfperm({fname}) String file permissions of file {fname}
getfsize({fname}) Number size in bytes of file {fname}
getftime({fname}) Number last modification time of file
getftype({fname}) String description of type of file {fname}
getjumplist([{winnr} [, {tabnr}]])
List list of jump list items
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
@@ -4560,6 +4562,26 @@ getftype({fname}) *getftype()*
"file" are returned. On MS-Windows a symbolic link to a
directory returns "dir" instead of "link".
*getjumplist()*
getjumplist([{winnr} [, {tabnr}]])
Returns the |jumplist| for the specified window.
Without arguments use the current window.
With {winnr} only use this window in the current tab page.
{winnr} can also be a |window-ID|.
With {winnr} and {tabnr} use the window in the specified tab
page.
The returned list contains two entries: a list with the jump
locations and the last used jump position number in the list.
Each entry in the jump location list is a dictionary with
the following entries:
bufnr buffer number
col column number
coladd column offset for 'virtualedit'
filename filename if available
lnum line number
*getline()*
getline({lnum} [, {end}])
Without {end} the result is a String, which is line {lnum}

View File

@@ -807,6 +807,7 @@ Buffers, windows and the argument list:
getbufinfo() get a list with buffer information
gettabinfo() get a list with tab page information
getwininfo() get a list with window information
getjumplist() get a list of jump list entries
Command line: *command-line-functions*
getcmdline() get the current command line