mirror of
https://github.com/neovim/neovim.git
synced 2025-10-03 16:36:30 +00:00
vim-patch:014c731: runtime(doc): make :h virtcol() more accurate (#35976)
The current description (especially the "unlimited width" part) is inaccurate in several ways: - The size of virtual text can depend on window width. In particular, the size of "above" virtual text can be equal to window width. - A double-width character that doesn't fit adds 1 to the virtual column of the following characters. - The size of 'showbreak' and 'breakindent' is counted. related: vim/vim#5713 closes: vim/vim#18447014c731fa5
(cherry picked from commit43f7434bd5
)
This commit is contained in:

committed by
github-actions[bot]
![github-actions[bot]](/assets/img/avatar_default.png)
parent
6dda8e9572
commit
dd79bc8360
@@ -11610,9 +11610,9 @@ values({dict}) *values()*
|
|||||||
|
|
||||||
virtcol({expr} [, {list} [, {winid}]]) *virtcol()*
|
virtcol({expr} [, {list} [, {winid}]]) *virtcol()*
|
||||||
The result is a Number, which is the screen column of the file
|
The result is a Number, which is the screen column of the file
|
||||||
position given with {expr}. That is, the last screen position
|
position given with {expr}. That is, the total number of
|
||||||
occupied by the character at that position, when the screen
|
screen cells occupied by the part of the line until the end of
|
||||||
would be of unlimited width. When there is a <Tab> at the
|
the character at that position. When there is a <Tab> at the
|
||||||
position, the returned Number will be the column at the end of
|
position, the returned Number will be the column at the end of
|
||||||
the <Tab>. For example, for a <Tab> in column 1, with 'ts'
|
the <Tab>. For example, for a <Tab> in column 1, with 'ts'
|
||||||
set to 8, it returns 8. |conceal| is ignored.
|
set to 8, it returns 8. |conceal| is ignored.
|
||||||
|
6
runtime/lua/vim/_meta/vimfn.lua
generated
6
runtime/lua/vim/_meta/vimfn.lua
generated
@@ -10567,9 +10567,9 @@ function vim.fn.utf16idx(string, idx, countcc, charidx) end
|
|||||||
function vim.fn.values(dict) end
|
function vim.fn.values(dict) end
|
||||||
|
|
||||||
--- The result is a Number, which is the screen column of the file
|
--- The result is a Number, which is the screen column of the file
|
||||||
--- position given with {expr}. That is, the last screen position
|
--- position given with {expr}. That is, the total number of
|
||||||
--- occupied by the character at that position, when the screen
|
--- screen cells occupied by the part of the line until the end of
|
||||||
--- would be of unlimited width. When there is a <Tab> at the
|
--- the character at that position. When there is a <Tab> at the
|
||||||
--- position, the returned Number will be the column at the end of
|
--- position, the returned Number will be the column at the end of
|
||||||
--- the <Tab>. For example, for a <Tab> in column 1, with 'ts'
|
--- the <Tab>. For example, for a <Tab> in column 1, with 'ts'
|
||||||
--- set to 8, it returns 8. |conceal| is ignored.
|
--- set to 8, it returns 8. |conceal| is ignored.
|
||||||
|
@@ -12790,9 +12790,9 @@ M.funcs = {
|
|||||||
base = 1,
|
base = 1,
|
||||||
desc = [=[
|
desc = [=[
|
||||||
The result is a Number, which is the screen column of the file
|
The result is a Number, which is the screen column of the file
|
||||||
position given with {expr}. That is, the last screen position
|
position given with {expr}. That is, the total number of
|
||||||
occupied by the character at that position, when the screen
|
screen cells occupied by the part of the line until the end of
|
||||||
would be of unlimited width. When there is a <Tab> at the
|
the character at that position. When there is a <Tab> at the
|
||||||
position, the returned Number will be the column at the end of
|
position, the returned Number will be the column at the end of
|
||||||
the <Tab>. For example, for a <Tab> in column 1, with 'ts'
|
the <Tab>. For example, for a <Tab> in column 1, with 'ts'
|
||||||
set to 8, it returns 8. |conceal| is ignored.
|
set to 8, it returns 8. |conceal| is ignored.
|
||||||
|
Reference in New Issue
Block a user