aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/eval.lua
diff options
context:
space:
mode:
authorzeertzjq <zeertzjq@outlook.com>2025-10-02 07:33:36 +0800
committerGitHub <noreply@github.com>2025-10-01 23:33:36 +0000
commit43f7434bd5fa5d13a3aefe4bfaea2973bae7dda2 (patch)
tree6b88b7d7d865bfac53ccea670da4347fb0aaf40f /src/nvim/eval.lua
parent70460d557c510149678f525efddc158709a79839 (diff)
downloadrneovim-43f7434bd5fa5d13a3aefe4bfaea2973bae7dda2.tar.gz
rneovim-43f7434bd5fa5d13a3aefe4bfaea2973bae7dda2.tar.bz2
rneovim-43f7434bd5fa5d13a3aefe4bfaea2973bae7dda2.zip
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#18447 https://github.com/vim/vim/commit/014c731fa50c28c94d56545938b6a05a86234c30
Diffstat (limited to 'src/nvim/eval.lua')
-rw-r--r--src/nvim/eval.lua6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/nvim/eval.lua b/src/nvim/eval.lua
index a028189910..eb3dae7ce5 100644
--- a/src/nvim/eval.lua
+++ b/src/nvim/eval.lua
@@ -12970,9 +12970,9 @@ M.funcs = {
base = 1,
desc = [=[
The result is a Number, which is the screen column of the file
- position given with {expr}. That is, the last screen position
- occupied by the character at that position, when the screen
- would be of unlimited width. When there is a <Tab> at the
+ position given with {expr}. That is, the total number of
+ screen cells occupied by the part of the line until the end of
+ the character at that position. When there is a <Tab> at the
position, the returned Number will be the column at the end of
the <Tab>. For example, for a <Tab> in column 1, with 'ts'
set to 8, it returns 8. |conceal| is ignored.