Open camsteffen opened 4 years ago
The original implementation handled comments. But then the regex was very long, and I figured the main usecase was for single-commit messages, so simplified the code heavily.
I might revisit the regex to handle squashed commits.
Even in a simple git commit
, the first line of comments is highlighted as "supposed to be blank". Maybe that case could be fixed more easily.
The original implementation handled comments.
Do you still have this one laying around? Because I didn't find it in the history of this repo and I'm also in search of those git-commit editor features (like https://github.com/mawww/kakoune/issues/3228)
Edit: are you referring to https://github.com/mawww/kakoune/issues/3228#issuecomment-558497519? I didn't try everything out yet... Tried and is not handling comments.
I think that was the implementation, and that it broke after Kakoune stopped interpreting \A
as the beginning of the buffer (or something).
Thanks! I'll see what I can do with it & learn more about highlighters in the process...
This occurs in some scenarios like doing a squash commit. I added some garbage to the first line to better illustrate the issue.
Either beginning comments should be parsed, or if that's too complex, just disable git-commit-overflow functionality altogether when there are comments at the beginning.