From b4f7cd94a140d6321d6e39c307e01d2a40046bbe Mon Sep 17 00:00:00 2001 From: pagedown Date: Thu, 9 Dec 2021 15:02:27 +0800 Subject: [PATCH] Fix paste mappable action --- kitty/options/utils.py | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/kitty/options/utils.py b/kitty/options/utils.py index 437e39219..bf3a6dc44 100644 --- a/kitty/options/utils.py +++ b/kitty/options/utils.py @@ -178,6 +178,16 @@ def paste_from_buffer(func: str, rest: str) -> FuncArgsType: return func, [rest] +@func_with_args('paste') +def paste_parse(func: str, rest: str) -> FuncArgsType: + text = '' + try: + text = python_string(rest) + except Exception: + log_error('Ignoring invalid paste string: ' + rest) + return func, [text] + + @func_with_args('neighboring_window') def neighboring_window(func: str, rest: str) -> FuncArgsType: rest = rest.lower()