mirror of
https://github.com/neovim/neovim.git
synced 2024-12-19 18:55:14 -07:00
vim-patch:d353d27: runtime(doc): restore description of "$" in col() and virtcol() (vim/vim#14981)
These are different from line() and getpos().
d353d27820
This commit is contained in:
parent
fab3d4721f
commit
6ba1521687
10
runtime/doc/builtin.txt
generated
10
runtime/doc/builtin.txt
generated
@ -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
|
||||
|
10
runtime/lua/vim/_meta/vimfn.lua
generated
10
runtime/lua/vim/_meta/vimfn.lua
generated
@ -913,6 +913,8 @@ function vim.fn.clearmatches(win) end
|
||||
--- 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
|
||||
@ -3332,7 +3334,7 @@ function vim.fn.getpid() end
|
||||
--- . 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
|
||||
@ -3382,8 +3384,8 @@ function vim.fn.getpid() end
|
||||
--- let save_a_mark = getpos("'a")
|
||||
--- " ...
|
||||
--- call setpos("'a", save_a_mark)
|
||||
---
|
||||
--- <Also see |getcharpos()|, |getcurpos()| and |setpos()|.
|
||||
--- <
|
||||
--- Also see |getcharpos()|, |getcurpos()| and |setpos()|.
|
||||
---
|
||||
--- @param expr string
|
||||
--- @return integer[]
|
||||
@ -10416,6 +10418,8 @@ function vim.fn.values(dict) end
|
||||
--- 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
|
||||
|
@ -1240,6 +1240,8 @@ M.funcs = {
|
||||
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
|
||||
@ -4144,7 +4146,7 @@ M.funcs = {
|
||||
. 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
|
||||
@ -4194,8 +4196,8 @@ M.funcs = {
|
||||
let save_a_mark = getpos("'a")
|
||||
" ...
|
||||
call setpos("'a", save_a_mark)
|
||||
|
||||
<Also see |getcharpos()|, |getcurpos()| and |setpos()|.
|
||||
<
|
||||
Also see |getcharpos()|, |getcurpos()| and |setpos()|.
|
||||
|
||||
]=],
|
||||
name = 'getpos',
|
||||
@ -12465,6 +12467,8 @@ M.funcs = {
|
||||
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
|
||||
|
Loading…
Reference in New Issue
Block a user