diff options
| author | Johannes Altmanninger <aclopte@gmail.com> | 2024-02-25 11:12:56 +0100 |
|---|---|---|
| committer | Maxime Coste <mawww@kakoune.org> | 2024-02-27 00:03:38 +1100 |
| commit | 847bf98b47d17b0dc5fcdfd0e0b842c50bb2a627 (patch) | |
| tree | a10460f61ad5724965b1f4433fb713ecce78ade1 | |
| parent | 40ffd5ff3b7e8990ddc9d1a96dcb4dd72423ceef (diff) | |
rc make: fix make-jump if selection includes trailing newline
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).
| -rw-r--r-- | rc/tools/make.kak | 2 |
1 files changed, 1 insertions, 1 deletions
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<a-?> "Entering directory" <ret><a-:> # Try to parse the error into capture groups, failing on absolute paths - execute-keys s "Entering directory [`']([^']+)'.*\n([^:\n/][^:\n]*):(\d+):(?:(\d+):)?([^\n]+)\z" <ret>l + execute-keys s "Entering directory [`']([^']+)'.*\n([^:\n/][^:\n]*):(\d+):(?:(\d+):)?([^\n]+)\n?\z" <ret>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 %{ |
