From efcd94820c4c3be92a5d7d15406b81a2e854e710 Mon Sep 17 00:00:00 2001 From: Olivier Perret Date: Thu, 5 Jul 2018 20:49:05 +0200 Subject: [PATCH] comment.kak: don't modify registers as side effect --- rc/core/comment.kak | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/rc/core/comment.kak b/rc/core/comment.kak index 4dee7df7..29d5004d 100644 --- a/rc/core/comment.kak +++ b/rc/core/comment.kak @@ -116,7 +116,7 @@ define-command comment-block -docstring '(un)comment selections using block comm echo "fail \"The 'comment_block' options are empty, could not comment the selection\"" fi } - evaluate-commands -draft %{ + evaluate-commands -save-regs '"/' -draft %{ # Keep non-empty selections execute-keys \A\s*\z @@ -143,7 +143,7 @@ define-command comment-line -docstring '(un)comment selected lines using line co 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