Mercurial > vim
comparison runtime/doc/eval.txt @ 12977:2d817fd289ba v8.0.1364
patch 8.0.1364: there is no easy way to get the window position
commit https://github.com/vim/vim/commit/22044dc31788d9f1c2da7725269884d9923b4795
Author: Bram Moolenaar <Bram@vim.org>
Date: Sat Dec 2 15:43:37 2017 +0100
patch 8.0.1364: there is no easy way to get the window position
Problem: There is no easy way to get the window position.
Solution: Add win_screenpos().
author | Christian Brabandt <cb@256bit.org> |
---|---|
date | Sat, 02 Dec 2017 15:45:04 +0100 |
parents | 45987b1b77dc |
children | e47e70300f30 |
comparison
equal
deleted
inserted
replaced
12976:1a4d7b63c490 | 12977:2d817fd289ba |
---|---|
2450 win_findbuf({bufnr}) List find windows containing {bufnr} | 2450 win_findbuf({bufnr}) List find windows containing {bufnr} |
2451 win_getid([{win} [, {tab}]]) Number get window ID for {win} in {tab} | 2451 win_getid([{win} [, {tab}]]) Number get window ID for {win} in {tab} |
2452 win_gotoid({expr}) Number go to window with ID {expr} | 2452 win_gotoid({expr}) Number go to window with ID {expr} |
2453 win_id2tabwin({expr}) List get tab and window nr from window ID | 2453 win_id2tabwin({expr}) List get tab and window nr from window ID |
2454 win_id2win({expr}) Number get window nr from window ID | 2454 win_id2win({expr}) Number get window nr from window ID |
2455 win_screenpos({nr}) List get screen position of window {nr} | |
2455 winbufnr({nr}) Number buffer number of window {nr} | 2456 winbufnr({nr}) Number buffer number of window {nr} |
2456 wincol() Number window column of the cursor | 2457 wincol() Number window column of the cursor |
2457 winheight({nr}) Number height of window {nr} | 2458 winheight({nr}) Number height of window {nr} |
2458 winline() Number window line of the cursor | 2459 winline() Number window line of the cursor |
2459 winnr([{expr}]) Number number of current window | 2460 winnr([{expr}]) Number number of current window |
8630 Return [0, 0] if the window cannot be found. | 8631 Return [0, 0] if the window cannot be found. |
8631 | 8632 |
8632 win_id2win({expr}) *win_id2win()* | 8633 win_id2win({expr}) *win_id2win()* |
8633 Return the window number of window with ID {expr}. | 8634 Return the window number of window with ID {expr}. |
8634 Return 0 if the window cannot be found in the current tabpage. | 8635 Return 0 if the window cannot be found in the current tabpage. |
8636 | |
8637 win_screenpos({nr}) *win_screenpos()* | |
8638 Return the screen position of window {nr} as a list with two | |
8639 numbers: [row, col]. The first window always has position | |
8640 [1, 1]. | |
8641 {nr} can be the window number or the |window-ID|. | |
8642 Return [0, 0] if the window cannot be found in the current | |
8643 tabpage. | |
8635 | 8644 |
8636 *winbufnr()* | 8645 *winbufnr()* |
8637 winbufnr({nr}) The result is a Number, which is the number of the buffer | 8646 winbufnr({nr}) The result is a Number, which is the number of the buffer |
8638 associated with window {nr}. {nr} can be the window number or | 8647 associated with window {nr}. {nr} can be the window number or |
8639 the |window-ID|. | 8648 the |window-ID|. |