aboutsummaryrefslogtreecommitdiff
path: root/runtime/doc/builtin.txt
diff options
context:
space:
mode:
authorzeertzjq <zeertzjq@outlook.com>2024-06-14 04:45:12 +0800
committerzeertzjq <zeertzjq@outlook.com>2024-06-14 04:49:21 +0800
commit6ba152168787e2cf7d197d8f2d682daaca0c94cf (patch)
treef0d62dcc12aec34df5bd42a6e2d939125f851775 /runtime/doc/builtin.txt
parentfab3d4721ffb5109c2c30633605af30d37d7d229 (diff)
downloadrneovim-6ba152168787e2cf7d197d8f2d682daaca0c94cf.tar.gz
rneovim-6ba152168787e2cf7d197d8f2d682daaca0c94cf.tar.bz2
rneovim-6ba152168787e2cf7d197d8f2d682daaca0c94cf.zip
vim-patch:d353d27: runtime(doc): restore description of "$" in col() and virtcol() (vim/vim#14981)
These are different from line() and getpos(). https://github.com/vim/vim/commit/d353d2782032b91498601afefee4256592f48074
Diffstat (limited to 'runtime/doc/builtin.txt')
-rw-r--r--runtime/doc/builtin.txt10
1 files changed, 7 insertions, 3 deletions
diff --git a/runtime/doc/builtin.txt b/runtime/doc/builtin.txt
index 7ccfe2f1b3..1472296bd9 100644
--- a/runtime/doc/builtin.txt
+++ b/runtime/doc/builtin.txt
@@ -703,6 +703,8 @@ col({expr} [, {winid}]) *col()*
The result is a Number, which is the byte index of the column
position given with {expr}.
For accepted positions see |getpos()|.
+ When {expr} is "$", it means the end of the cursor line, so
+ the result is the number of bytes in the cursor line plus one.
Additionally {expr} can be [lnum, col]: a |List| with the line
and column number. Most useful when the column is "$", to get
the last column of a specific line. When "lnum" or "col" is
@@ -2742,7 +2744,7 @@ getpos({expr}) *getpos()*
. The cursor position.
$ The last line in the current buffer.
'x Position of mark x (if the mark is not set, 0 is
- returned).
+ returned for all values).
w0 First line visible in current window (one if the
display isn't updated, e.g. in silent Ex mode).
w$ Last line visible in current window (this is one
@@ -2792,8 +2794,8 @@ getpos({expr}) *getpos()*
let save_a_mark = getpos("'a")
" ...
call setpos("'a", save_a_mark)
-
-< Also see |getcharpos()|, |getcurpos()| and |setpos()|.
+<
+ Also see |getcharpos()|, |getcurpos()| and |setpos()|.
getqflist([{what}]) *getqflist()*
Returns a |List| with all the current quickfix errors. Each
@@ -8752,6 +8754,8 @@ virtcol({expr} [, {list} [, {winid}]]) *virtcol()*
For the byte position use |col()|.
For the use of {expr} see |getpos()| and |col()|.
+ When {expr} is "$", it means the end of the cursor line, so
+ the result is the number of cells in the cursor line plus one.
When 'virtualedit' is used {expr} can be [lnum, col, off],
where "off" is the offset in screen columns from the start of