summaryrefslogtreecommitdiffstats
path: root/runtime
diff options
context:
space:
mode:
authorBram Moolenaar <Bram@vim.org>2017-12-02 15:43:37 +0100
committerBram Moolenaar <Bram@vim.org>2017-12-02 15:43:37 +0100
commit22044dc31788d9f1c2da7725269884d9923b4795 (patch)
tree494741760117a459b7dd197e2bcb1e3ed9d87cc5 /runtime
parentaf903e5d490ec9c6c49079f67de7e92e3c35a725 (diff)
patch 8.0.1364: there is no easy way to get the window positionv8.0.1364
Problem: There is no easy way to get the window position. Solution: Add win_screenpos().
Diffstat (limited to 'runtime')
-rw-r--r--runtime/doc/eval.txt9
1 files changed, 9 insertions, 0 deletions
diff --git a/runtime/doc/eval.txt b/runtime/doc/eval.txt
index 29b3de887a..4d524679d3 100644
--- a/runtime/doc/eval.txt
+++ b/runtime/doc/eval.txt
@@ -2452,6 +2452,7 @@ win_getid([{win} [, {tab}]]) Number get window ID for {win} in {tab}
win_gotoid({expr}) Number go to window with ID {expr}
win_id2tabwin({expr}) List get tab and window nr from window ID
win_id2win({expr}) Number get window nr from window ID
+win_screenpos({nr}) List get screen position of window {nr}
winbufnr({nr}) Number buffer number of window {nr}
wincol() Number window column of the cursor
winheight({nr}) Number height of window {nr}
@@ -8633,6 +8634,14 @@ win_id2win({expr}) *win_id2win()*
Return the window number of window with ID {expr}.
Return 0 if the window cannot be found in the current tabpage.
+win_screenpos({nr}) *win_screenpos()*
+ Return the screen position of window {nr} as a list with two
+ numbers: [row, col]. The first window always has position
+ [1, 1].
+ {nr} can be the window number or the |window-ID|.
+ Return [0, 0] if the window cannot be found in the current
+ tabpage.
+
*winbufnr()*
winbufnr({nr}) The result is a Number, which is the number of the buffer
associated with window {nr}. {nr} can be the window number or