Fix usages of ModeChange hook

hook param always begins with either push: or pop:

Fixes #4078
This commit is contained in:
Isa Cichon 2021-02-28 21:07:21 +01:00
parent 2ef18140f1
commit 0fc91b9576
3 changed files with 3 additions and 3 deletions

View File

@ -14,7 +14,7 @@ hook global BufCreate .*[.](dhall) %{
hook global WinSetOption filetype=dhall %{ hook global WinSetOption filetype=dhall %{
require-module dhall require-module dhall
hook window ModeChange insert:.* -group dhall-trim-indent dhall-trim-indent hook window ModeChange pop:insert:.* -group dhall-trim-indent dhall-trim-indent
hook window InsertChar \n -group dhall-indent dhall-indent-on-new-line hook window InsertChar \n -group dhall-indent dhall-indent-on-new-line
hook -once -always window WinSetOption filetype=.* %{ remove-hooks window dhall-.+ } hook -once -always window WinSetOption filetype=.* %{ remove-hooks window dhall-.+ }

View File

@ -15,7 +15,7 @@ hook global WinSetOption filetype=gluon %{
require-module gluon require-module gluon
set-option window extra_word_chars '_' "'" set-option window extra_word_chars '_' "'"
hook window ModeChange insert:.* -group gluon-trim-indent gluon-trim-indent hook window ModeChange pop:insert:.* -group gluon-trim-indent gluon-trim-indent
hook window InsertChar \n -group gluon-indent gluon-indent-on-new-line hook window InsertChar \n -group gluon-indent gluon-indent-on-new-line
hook -once -always window WinSetOption filetype=.* %{ hook -once -always window WinSetOption filetype=.* %{

View File

@ -16,7 +16,7 @@ hook global WinSetOption filetype=ninja %{
set-option window static_words %opt{ninja_static_words} set-option window static_words %opt{ninja_static_words}
hook window ModeChange insert:.* -group ninja-trim-indent ninja-trim-indent hook window ModeChange pop:insert:.* -group ninja-trim-indent ninja-trim-indent
hook window InsertChar \n -group ninja-indent ninja-indent-on-new-line hook window InsertChar \n -group ninja-indent ninja-indent-on-new-line
# cleanup trailing whitespaces on current line insert end # cleanup trailing whitespaces on current line insert end
hook window ModeChange pop:insert:.* -group ninja-trim-indent %{ try %{ execute-keys -draft <semicolon> <a-x> s ^\h+$ <ret> d } } hook window ModeChange pop:insert:.* -group ninja-trim-indent %{ try %{ execute-keys -draft <semicolon> <a-x> s ^\h+$ <ret> d } }