Fix hare new line insert indentation after comments

At the moment, inserting a new line while being in a comment result in a
"//<indentation>" instead of "<indentation>//".

To fix this, we just re-order both InsertChar hooks.
This commit is contained in:
Stacy Harper 2022-11-19 08:29:03 +01:00
parent 91d45a100a
commit becb1ef843
No known key found for this signature in database
GPG Key ID: EABA44759877E02A

View File

@ -7,8 +7,8 @@ hook global BufCreate .*[.]ha %{
hook global WinSetOption filetype=hare %{ hook global WinSetOption filetype=hare %{
require-module hare require-module hare
hook window ModeChange pop:insert:.* -group hare-trim-indent hare-trim-indent hook window ModeChange pop:insert:.* -group hare-trim-indent hare-trim-indent
hook window InsertChar \n -group hare-indent hare-indent-on-new-line
hook window InsertChar \n -group hare-insert hare-insert-on-new-line hook window InsertChar \n -group hare-insert hare-insert-on-new-line
hook window InsertChar \n -group hare-indent hare-indent-on-new-line
hook window InsertChar \{ -group hare-indent hare-indent-on-opening-curly-brace hook window InsertChar \{ -group hare-indent hare-indent-on-opening-curly-brace
hook window InsertChar \} -group hare-indent hare-indent-on-closing-curly-brace hook window InsertChar \} -group hare-indent hare-indent-on-closing-curly-brace
} }