Folding Breaks When First Line of Method Is A Multiline Comment #28631
Labels
bug
issues reporting wrong behavior
folds
needs:repro
We need minimal steps to reproduce the issue
needs:response
waiting for reply from the author
treesitter
Problem
Working with PHP in neovim, I found a consistent code folding issue. System is Alma Linux 8.7.
The key to replicating this issue is the position of a multiline comment.
When a multiline comment exists on the first line of a class method, when the method is folded, then copied, then pasted to another location in the file, when you attempt to fold the newly-pasted method, the entire class folds instead. At this point it is impossible to fold any single method.
The only solution is the insert a blank line between method name and the multiline comment. Once this is done, then the method, and all other methods now fold properly.
Steps to reproduce
Expected behavior
We expect the newly-pasted method to fold without folding the entire class.
Inserting a blank line between method name and the multiline comment restores normal folding behavior.
Neovim version (nvim -v)
0.10.0-dev-2930+g47ba96a6b
Vim (not Nvim) behaves the same?
No, neovim only
Operating system/version
Alma Linux 8.7
Terminal name/version
SecureCRT 9.4.1
$TERM environment variable
xterm-256color
Installation
dnf package mgr
The text was updated successfully, but these errors were encountered: