From 73f5f32385f8147610e8413d19d94107bece0ccb Mon Sep 17 00:00:00 2001 From: John Isom Date: Sat, 1 Aug 2020 09:53:51 -0600 Subject: [PATCH] Wrap all 'indent-on-new-line' commands in 'evaluate-commands -no-hook -draft -itersel' --- rc/filetype/crystal.kak | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) 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' + } } }