runtime(comment): commenting might be off by one column

getpos columns start at 1 and not 0 as do arrays

closes: #15774

Signed-off-by: Konfekt <Konfekt@users.noreply.github.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
This commit is contained in:
Konfekt
2024-10-01 20:02:15 +02:00
committed by Christian Brabandt
parent 47f8584a80
commit e021f39b79
2 changed files with 12 additions and 7 deletions

View File

@ -1,4 +1,4 @@
*comment.txt* For Vim version 9.1. Last change: 2024 Sep 30
*comment.txt* For Vim version 9.1. Last change: 2024 Oct 01
VIM REFERENCE MANUAL
@ -38,6 +38,11 @@ depends on the first line of the range of lines to act upon. When it matches
a comment marker, the line will be un-commented, if it doesn't, the line will
be commented out. Blank and empty lines are ignored.
The value of 'commentstring' is the same for the entire buffer and determined
by its filetype (|filetypes|). To adapt it within the buffer for embedded
languages, you can use a plug-in such as
https://github.com/suy/vim-context-commentstring.
The comment marker will always be padded with blanks whether or not the
'commentstring' value contains whitespace around "%s".