From 847bf98b47d17b0dc5fcdfd0e0b842c50bb2a627 Mon Sep 17 00:00:00 2001 From: Johannes Altmanninger Date: Sun, 25 Feb 2024 11:12:56 +0100 Subject: [PATCH] rc make: fix make-jump if selection includes trailing newline MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Given make[1]: Entering directory '/home/johannes/git/kakoune/src' main.cc:66:9: error: expected ‘}’ before ‘asdf’ If I select the whole second line, including the newline, make-jump fails with an enigmatic "no such file or directory main.cc". This is because `gl` does not move the cursor away from the newline. Fix it. This appears to have regressed in 80d661e6a (rc/: More consistent uses of regex syntax, 2017-09-29). --- rc/tools/make.kak | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/rc/tools/make.kak b/rc/tools/make.kak index f2c47292..85260bc6 100644 --- a/rc/tools/make.kak +++ b/rc/tools/make.kak @@ -56,7 +56,7 @@ define-command -hidden make-jump %{ try %{ execute-keys gl "Entering directory" # Try to parse the error into capture groups, failing on absolute paths - execute-keys s "Entering directory [`']([^']+)'.*\n([^:\n/][^:\n]*):(\d+):(?:(\d+):)?([^\n]+)\z" l + execute-keys s "Entering directory [`']([^']+)'.*\n([^:\n/][^:\n]*):(\d+):(?:(\d+):)?([^\n]+)\n?\z" l set-option buffer make_current_error_line %val{cursor_line} make-open-error "%reg{1}/%reg{2}" "%reg{3}" "%reg{4}" "%reg{5}" } catch %{