New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[BUG] comment-line sometimes does not comment filetype=sh #5096
Comments
there is at least one issue when the filetype is first something like Can you reproduce wiht this in your kakrc:
and post the contents of the debug buffer. The conf hook is already a hack; ideally resetting the option when a filetype gets unset works for all filetypes, even the empty one. |
Here is the requested debug output..
with the stock comment.kak (without the hook for filetype=sh that i added) opening a script which sets the filetype with modeline-prompt. i opened this file and attempted to immediately comment the first line. |
I'm working on a fix, my current approach is to add a |
Version of Kakoune
v2023.08.05
Reproducer
Execute :comment-line on selected lines
Outcome
comment-line on occasion with shell scripts (whose filetype is set via modeline-prompt) will complain: "the 'commert_line' option is empty, could not comment the line".
Expectations
Comment/uncomment line.
Additional information
comment.kak, while setting the commert_line option to '#' by default, appears to have this unset during buffer loading (perhaps a timing conflict with modeline-prompt?).
The solution was to modify comment.kak. I simply changed the hook for filetype=conf to filetype=(conf|sh)
The text was updated successfully, but these errors were encountered: