From d0571ce2383e9e4dbffd6ccf50e6dc18b43241b3 Mon Sep 17 00:00:00 2001 From: Bob Qi Date: Thu, 26 Oct 2023 10:13:07 +0800 Subject: [PATCH] rc/make.kak support override the whole error line pattern --- rc/tools/make.kak | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/rc/tools/make.kak b/rc/tools/make.kak index a150480b..5b1e7779 100644 --- a/rc/tools/make.kak +++ b/rc/tools/make.kak @@ -1,7 +1,7 @@ declare-option -docstring "shell command run to build the project" \ str makecmd make declare-option -docstring "pattern that describes lines containing information about errors in the output of the `makecmd` command" \ - str make_error_pattern " (?:fatal )?error:" + str make_error_pattern "^(?:\w:)?[^:\n]+:\d+:(?:\d+:)? (?:fatal )?error:" declare-option -docstring "name of the client in which utilities display information" \ str toolsclient @@ -69,7 +69,7 @@ define-command -hidden make-jump %{ define-command make-next-error -docstring 'Jump to the next make error' %{ evaluate-commands -try-client %opt{jumpclient} %{ buffer '*make*' - execute-keys "%opt{make_current_error_line}ggl" "/^(?:\w:)?[^:\n]+:\d+:(?:\d+:)?%opt{make_error_pattern}" + execute-keys "%opt{make_current_error_line}ggl" "/%opt{make_error_pattern}" make-jump } try %{ @@ -83,7 +83,7 @@ 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} %{ buffer '*make*' - execute-keys "%opt{make_current_error_line}g" "^(?:\w:)?[^:\n]+:\d+:(?:\d+:)?%opt{make_error_pattern}" + execute-keys "%opt{make_current_error_line}g" "%opt{make_error_pattern}" make-jump } try %{