summaryrefslogtreecommitdiff
path: root/rc
diff options
context:
space:
mode:
authorMaxime Coste <mawww@kakoune.org>2025-06-19 10:02:11 +1000
committerMaxime Coste <mawww@kakoune.org>2025-06-19 10:02:11 +1000
commite3b002d014ce89474154317f4e8739e7561d5774 (patch)
tree74d93ef5e49b58587053e93e34d05a8bc1e66163 /rc
parent50cdb754fb9cc1d8af79285cf6076330de02de20 (diff)
parent23025f561ee4f2bc2b3018e6feb9d1f7fdc2aba3 (diff)
Merge branch 'make_error_pattern_multiline' of https://github.com/ygrek/kakoune
Diffstat (limited to 'rc')
-rw-r--r--rc/tools/make.kak10
1 files changed, 6 insertions, 4 deletions
diff --git a/rc/tools/make.kak b/rc/tools/make.kak
index 7de2051d..9bc71c2e 100644
--- a/rc/tools/make.kak
+++ b/rc/tools/make.kak
@@ -62,8 +62,9 @@ define-command -hidden make-jump %{
set-option buffer jump_current_line %val{cursor_line}
set-register a "%reg{1}/%reg{2}" "%reg{3}" "%reg{4}" "%reg{5}"
} catch %{
- set-register / %opt{make_error_pattern}
- execute-keys <a-h><a-l> s<ret>l
+ # check if error pattern matches exactly at the start of the current line, possibly spanning more lines
+ set-register / "\A%opt{make_error_pattern}"
+ execute-keys ghGe s<ret>l
set-option buffer jump_current_line %val{cursor_line}
set-register a "%reg{1}" "%reg{2}" "%reg{3}" "%reg{4}"
}
@@ -73,11 +74,12 @@ define-command -hidden make-jump %{
}
define-command -hidden make-select-next %{
set-register / %opt{make_error_pattern}
- execute-keys "%opt{jump_current_line}ggl" "/<ret>"
+ # go to the current line end, search and go to the start of selection
+ execute-keys "%opt{jump_current_line}ggl" "/<ret><a-;>;"
}
define-command -hidden make-select-previous %{
set-register / %opt{make_error_pattern}
- execute-keys "%opt{jump_current_line}g" "<a-/><ret>"
+ execute-keys "%opt{jump_current_line}g" "<a-/><ret><a-;>;"
}
define-command make-next-error -docstring %{alias for "jump-next *make*"} %{