From 89280d0f203fa2b62317d9abd649c024e40244f0 Mon Sep 17 00:00:00 2001 From: Maxim Baz Date: Thu, 5 Jul 2018 23:29:53 +0200 Subject: [PATCH] Update according to bbtu --- rc/core/comment.kak | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/rc/core/comment.kak b/rc/core/comment.kak index add80977..f4f1d9aa 100644 --- a/rc/core/comment.kak +++ b/rc/core/comment.kak @@ -138,12 +138,12 @@ define-command comment-block -docstring '(un)comment selections using block comm } define-command comment-line -docstring '(un)comment selected lines using line comments' %{ - %sh{ + evaluate-commands %sh{ if [ -z "${kak_opt_comment_line}" ]; then echo "fail \"The 'comment_line' option is empty, could not comment the line\"" fi } - evaluate-commands -draft %{ + evaluate-commands -save-regs '"/' -draft %{ # Select the content of the lines, without indentation execute-keys gi @@ -172,7 +172,7 @@ define-command comment-line -docstring '(un)comment selected lines using line co } define-command align-selections-left -docstring 'extend selections to the left to align with the leftmost selected column' %{ - %sh{ + evaluate-commands %sh{ leftmost_column=$(echo "$kak_selections_desc" | tr ':' '\n' | cut -d',' -f1 | cut -d'.' -f2 | sort -n | head -n1) aligned_selections=$(echo "$kak_selections_desc" | sed -E "s/\.[0-9]+,/.$leftmost_column,/g") echo "select $aligned_selections"