diff options
author | Björn Linse <bjorn.linse@gmail.com> | 2019-09-05 12:50:38 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-09-05 12:50:38 +0200 |
commit | 79ea47d47836154cfb5a9574faa5c2af8422486a (patch) | |
tree | e3498beaa706b1424e71d142d1d01b809056f59b /runtime | |
parent | 632ee8d2ed6e307cc4d9ca2cf9e3ba0531a8af51 (diff) | |
parent | d5162afa2aee6609bf5d4f818639235b70c57a9a (diff) | |
download | rneovim-79ea47d47836154cfb5a9574faa5c2af8422486a.tar.gz rneovim-79ea47d47836154cfb5a9574faa5c2af8422486a.tar.bz2 rneovim-79ea47d47836154cfb5a9574faa5c2af8422486a.zip |
Merge pull request #10451 from bfredl/floatbuf
anchor float to buffer position
Diffstat (limited to 'runtime')
-rw-r--r-- | runtime/doc/eval.txt | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/runtime/doc/eval.txt b/runtime/doc/eval.txt index 8ec9dbdbdf..7cafc16ce9 100644 --- a/runtime/doc/eval.txt +++ b/runtime/doc/eval.txt @@ -2299,6 +2299,7 @@ rpcrequest({channel}, {method}[, {args}...]) screenattr({row}, {col}) Number attribute at screen position screenchar({row}, {col}) Number character at screen position screencol() Number current cursor column +screenpos({winid}, {lnum}, {col}) Dict screen row and col of a text character screenrow() Number current cursor row search({pattern} [, {flags} [, {stopline} [, {timeout}]]]) Number search for {pattern} @@ -6796,7 +6797,25 @@ screencol() *screencol()* the following mappings: > nnoremap <expr> GG ":echom ".screencol()."\n" nnoremap <silent> GG :echom screencol()<CR> + noremap GG <Cmd>echom screencol()<Cr> < +screenpos({winid}, {lnum}, {col}) *screenpos()* + The result is a Dict with the screen position of the text + character in window {winid} at buffer line {lnum} and column + {col}. {col} is a one-based byte index. + The Dict has these members: + row screen row + col first screen column + endcol last screen column + curscol cursor screen column + If the specified position is not visible, all values are zero. + The "endcol" value differs from "col" when the character + occupies more than one screen cell. E.g. for a Tab "col" can + be 1 and "endcol" can be 8. + The "curscol" value is where the cursor would be placed. For + a Tab it would be the same as "endcol", while for a double + width character it would be the same as "col". + screenrow() *screenrow()* The result is a Number, which is the current screen row of the cursor. The top line has number one. |