diff options
| author | Maxime Coste <mawww@kakoune.org> | 2024-04-19 16:49:58 +1000 |
|---|---|---|
| committer | Maxime Coste <mawww@kakoune.org> | 2024-04-27 16:31:40 +1000 |
| commit | da1c302a37c00cdcc16da4c1f292ccbeecfd181b (patch) | |
| tree | f433ddffda5cd6fd6a487ac2089d2ab43ea9bb50 | |
| parent | 5fd9bb59e35ceeeb0d6661ff5fad950a85c7612a (diff) | |
Make grep-(next|prev)-match use the latest buffer matching \*grep(-.*)\*
| -rw-r--r-- | rc/tools/grep.kak | 4 | ||||
| -rw-r--r-- | rc/tools/jump.kak | 12 |
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 } } |
