diff --git a/rc/filetype/crystal.kak b/rc/filetype/crystal.kak index 6d8e7fbe1..6bbf35da5 100644 --- a/rc/filetype/crystal.kak +++ b/rc/filetype/crystal.kak @@ -179,13 +179,15 @@ evaluate-commands %sh[ # ‾‾‾‾‾‾‾‾ define-command -hidden crystal-indent-on-new-line %{ - # Copy previous line indent - try %{ - execute-keys -draft 'K' - } - # Remove empty line indent - try %{ - execute-keys -draft 'ks^\h+$d' + evaluate-commands -no-hooks -draft -itersel %{ + # Copy previous line indent + try %{ + execute-keys -draft 'K' + } + # Remove empty line indent + try %{ + execute-keys -draft 'ks^\h+$d' + } } }