diff --git a/rc/commenting.kak b/rc/commenting.kak index b8d3dbd7..7fa7caed 100644 --- a/rc/commenting.kak +++ b/rc/commenting.kak @@ -30,10 +30,10 @@ def comment-selection -docstring "Comment/uncomment the current selection" %{ exec -draft %{\A${opening_escaped}.*${closing_escaped}\z} ## Comment the selection - exec %{a ${closing}i${opening} $((${#opening} + 1))H} + exec %{a${closing}i${opening}${#opening}H} } catch %{ ## Uncomment the commented selection - exec -draft %{s(\A${opening_escaped} )|( ${closing_escaped}\z)d} + exec -draft %{s(\A${opening_escaped})|(${closing_escaped}\z)d} } }" } @@ -67,7 +67,7 @@ def comment-line -docstring "Comment/uncomment the current line" %{ exec -draft %{^${opening_escaped}} ## Comment the line - exec %{i${opening} $((${#opening} + 1))H} + exec %{i${opening}${#opening}H} } catch %{ ## Uncomment the line exec -draft %{s^${opening_escaped}\h*d}