summaryrefslogtreecommitdiffstats
path: root/runtime
diff options
context:
space:
mode:
authorBram Moolenaar <Bram@vim.org>2020-09-22 21:55:41 +0200
committerBram Moolenaar <Bram@vim.org>2020-09-22 21:55:41 +0200
commit99ca9c4868bb1669706b9e3de9a9218bd11cc459 (patch)
tree5ee65a27548647c2ef50b21435433a6bd7299d9f /runtime
parent4f73b8e9cc83f647b34002554a8bdf9abec0a82f (diff)
patch 8.2.1727: a popup created with "cursorline" will ignore "firstline"v8.2.1727
Problem: A popup created with "cursorline" will ignore "firstline". Solution: When both "cursorline" and "firstline" are present put the cursor on "firstline". (closes #7000) Add the "winid" argument to getcurpos().
Diffstat (limited to 'runtime')
-rw-r--r--runtime/doc/eval.txt18
1 files changed, 13 insertions, 5 deletions
diff --git a/runtime/doc/eval.txt b/runtime/doc/eval.txt
index f0271c01dc..0853007767 100644
--- a/runtime/doc/eval.txt
+++ b/runtime/doc/eval.txt
@@ -1,4 +1,4 @@
-*eval.txt* For Vim version 8.2. Last change: 2020 Sep 16
+*eval.txt* For Vim version 8.2. Last change: 2020 Sep 22
VIM REFERENCE MANUAL by Bram Moolenaar
@@ -2516,7 +2516,7 @@ getcmdtype() String return current command-line type
getcmdwintype() String return current command-line window type
getcompletion({pat}, {type} [, {filtered}])
List list of cmdline completion matches
-getcurpos() List position of the cursor
+getcurpos([{winnr}]) List position of the cursor
getcwd([{winnr} [, {tabnr}]]) String get the current working directory
getenv({name}) String return environment variable
getfontname([{name}]) String name of font being used
@@ -5261,13 +5261,20 @@ getcompletion({pat}, {type} [, {filtered}]) *getcompletion()*
GetPattern()->getcompletion('color')
<
*getcurpos()*
-getcurpos() Get the position of the cursor. This is like getpos('.'), but
+getcurpos([{winid}])
+ Get the position of the cursor. This is like getpos('.'), but
includes an extra "curswant" item in the list:
[0, lnum, col, off, curswant] ~
The "curswant" number is the preferred column when moving the
cursor vertically. Also see |getpos()|.
The first "bufnum" item is always zero.
+ The optional {winid} argument can specify the window. It can
+ be the window number or the |window-ID|. The last known
+ cursor position is returned, this may be invalid for the
+ current value of the buffer if it is not the current window.
+ If {winid} is invalid a list with zeroes is returned.
+
This can be used to save and restore the cursor position: >
let save_cursor = getcurpos()
MoveTheCursorAround
@@ -5478,8 +5485,9 @@ getloclist({nr} [, {what}]) *getloclist()*
|location-list-file-window| for more
details.
- Returns an empty Dictionary if there is no location list for
- the window {nr} or the window is not present.
+ Returns a Dictionary with default values if there is no location
+ list for the window {nr}.
+ Returns an empty Dictionary if window {nr} does not exist.
Examples (See also |getqflist-examples|): >
:echo getloclist(3, {'all': 0})