bug#80837: treesit-forward-comment off-by-one issue: overshoots by one character
Juri Linkov <[email protected]> Fri, 31 Jul 2026 20:24:17 +0300
| Newsgroups | gmane.emacs.bugs |
|---|---|
| Organization | LINKOV.NET |
| Message-ID | <[email protected]> |
>> -(defun treesit-forward-comment (&optional count) >> +(defun treesit-forward-comment (count) > > I'd refrain from including this part of the change. I don't remember why I made this argument optional. Probably by mistake because it was intended to have the same signature as `forward-comment` where the argument is not optional. So it would be nice to fix this blunder before this function's first release. > Also, I'm not sure we need the whole `treesit--likely-line-comment-p`: > can we just test if `comment-end` is nil instead? Testing for an empty `comment-end` should work at least for c-ts-more and lua-ts-mode where the comment thing is set.