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).
This commit is contained in:
parent
40ffd5ff3b
commit
847bf98b47
|
@ -56,7 +56,7 @@ define-command -hidden make-jump %{
|
||||||
try %{
|
try %{
|
||||||
execute-keys gl<a-?> "Entering directory" <ret><a-:>
|
execute-keys gl<a-?> "Entering directory" <ret><a-:>
|
||||||
# Try to parse the error into capture groups, failing on absolute paths
|
# 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}
|
set-option buffer make_current_error_line %val{cursor_line}
|
||||||
make-open-error "%reg{1}/%reg{2}" "%reg{3}" "%reg{4}" "%reg{5}"
|
make-open-error "%reg{1}/%reg{2}" "%reg{3}" "%reg{4}" "%reg{5}"
|
||||||
} catch %{
|
} catch %{
|
||||||
|
|
Loading…
Reference in New Issue
Block a user