From 2d849cc147ad7de54d3070ad3f80c78cc86352a7 Mon Sep 17 00:00:00 2001 From: Bob Qi Date: Fri, 27 Oct 2023 08:25:38 +0800 Subject: [PATCH] rc/make.kak set search register to avoid injection --- rc/tools/make.kak | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/rc/tools/make.kak b/rc/tools/make.kak index 5b1e7779..74e16864 100644 --- a/rc/tools/make.kak +++ b/rc/tools/make.kak @@ -67,9 +67,10 @@ define-command -hidden make-jump %{ } define-command make-next-error -docstring 'Jump to the next make error' %{ - evaluate-commands -try-client %opt{jumpclient} %{ + evaluate-commands -try-client %opt{jumpclient} -save-regs / %{ buffer '*make*' - execute-keys "%opt{make_current_error_line}ggl" "/%opt{make_error_pattern}" + set-register / %opt{make_error_pattern} + execute-keys "%opt{make_current_error_line}ggl" "/" make-jump } try %{ @@ -81,9 +82,10 @@ define-command make-next-error -docstring 'Jump to the next make error' %{ } define-command make-previous-error -docstring 'Jump to the previous make error' %{ - evaluate-commands -try-client %opt{jumpclient} %{ + evaluate-commands -try-client %opt{jumpclient} -save-regs / %{ buffer '*make*' - execute-keys "%opt{make_current_error_line}g" "%opt{make_error_pattern}" + set-register / %opt{make_error_pattern} + execute-keys "%opt{make_current_error_line}g" "" make-jump } try %{