From 8e1646b702688ec9f2366ea6cb6ab14b8db1d9c6 Mon Sep 17 00:00:00 2001 From: Maxime Coste Date: Wed, 16 May 2018 21:41:17 +1000 Subject: [PATCH] c-family.kak: Remove unneeded itersel itersel can get very expensive with many selections, it should only be used when necessary. --- rc/core/c-family.kak | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/rc/core/c-family.kak b/rc/core/c-family.kak index 6018add0..5d57d2ba 100644 --- a/rc/core/c-family.kak +++ b/rc/core/c-family.kak @@ -23,10 +23,10 @@ hook global BufCreate .*\.m %{ set-option buffer filetype objc } -define-command -hidden c-family-trim-autoindent %[ evaluate-commands -draft -itersel %[ +define-command -hidden c-family-trim-autoindent %{ # remove the line if it's empty when leaving the insert mode - try %[ execute-keys 1s^(\h+)$ d ] -] ] + try %{ execute-keys -draft 1s^(\h+)$ d } +} define-command -hidden c-family-indent-on-newline %< evaluate-commands -draft -itersel %< execute-keys \;