summaryrefslogtreecommitdiff
path: root/rc
diff options
context:
space:
mode:
authorMaxime Coste <mawww@kakoune.org>2024-04-19 16:49:58 +1000
committerMaxime Coste <mawww@kakoune.org>2024-04-27 16:31:40 +1000
commitda1c302a37c00cdcc16da4c1f292ccbeecfd181b (patch)
treef433ddffda5cd6fd6a487ac2089d2ab43ea9bb50 /rc
parent5fd9bb59e35ceeeb0d6661ff5fad950a85c7612a (diff)
Make grep-(next|prev)-match use the latest buffer matching \*grep(-.*)\*
Diffstat (limited to 'rc')
-rw-r--r--rc/tools/grep.kak4
-rw-r--r--rc/tools/jump.kak12
2 files changed, 8 insertions, 8 deletions
diff --git a/rc/tools/grep.kak b/rc/tools/grep.kak
index 79931c0a..13b5b9c3 100644
--- a/rc/tools/grep.kak
+++ b/rc/tools/grep.kak
@@ -54,11 +54,11 @@ define-command -hidden grep-jump %{
}
define-command grep-next-match -docstring %{alias for "jump-next *grep*"} %{
- jump-next *grep*
+ jump-next -matching \*grep(-.*)?\*
}
define-command grep-previous-match -docstring %{alias for "jump-previous *grep*"} %{
- jump-previous *grep*
+ jump-previous -matching \*grep(-.*)?\*
}
}
diff --git a/rc/tools/jump.kak b/rc/tools/jump.kak
index 51d0bca2..60d777d4 100644
--- a/rc/tools/jump.kak
+++ b/rc/tools/jump.kak
@@ -21,17 +21,17 @@ define-command -hidden jump %{
}
}
-define-command jump-next -params 1 -docstring %{
+define-command jump-next -params 1.. -docstring %{
jump-next <bufname>: jump to next location listed in the given *grep*-like location list buffer.
} %{
evaluate-commands -try-client %opt{jumpclient} -save-regs / %{
- buffer %arg{1}
+ buffer %arg{@}
jump-select-next
jump
}
try %{
evaluate-commands -client %opt{toolsclient} %{
- buffer %arg{1}
+ buffer %arg{@}
execute-keys gg %opt{jump_current_line}g
}
}
@@ -44,17 +44,17 @@ define-command -hidden jump-select-next %{
execute-keys ge %opt{jump_current_line}g<a-l> /^[^:\n]+:\d+:<ret>
}
-define-command jump-previous -params 1 -docstring %{
+define-command jump-previous -params 1.. -docstring %{
jump-previous <bufname>: jump to previous location listed in the given *grep*-like location list buffer.
} %{
evaluate-commands -try-client %opt{jumpclient} -save-regs / %{
- buffer %arg{1}
+ buffer %arg{@}
jump-select-previous
jump
}
try %{
evaluate-commands -client %opt{toolsclient} %{
- buffer %arg{1}
+ buffer %arg{@}
execute-keys gg %opt{jump_current_line}g
}
}