mirror of
https://github.com/mawww/kakoune.git
synced 2024-11-22 22:55:26 +03:00
bring *grep* buffer to front in context of toolsclient
This commit is contained in:
parent
2c437cfa02
commit
649e252f75
@ -53,13 +53,18 @@ define-command -hidden grep-jump %{
|
||||
define-command grep-next-match -docstring 'Jump to the next grep match' %{
|
||||
evaluate-commands -try-client %opt{jumpclient} %{
|
||||
buffer '*grep*'
|
||||
# First jump to enf of buffer so that if grep_current_line == 0
|
||||
# First jump to end of buffer so that if grep_current_line == 0
|
||||
# 0g<a-l> will be a no-op and we'll jump to the first result.
|
||||
# Yeah, thats ugly...
|
||||
execute-keys "ge %opt{grep_current_line}g<a-l> /^[^:]+:\d+:<ret>"
|
||||
grep-jump
|
||||
}
|
||||
try %{ evaluate-commands -client %opt{toolsclient} %{ execute-keys gg %opt{grep_current_line}g } }
|
||||
try %{
|
||||
evaluate-commands -client %opt{toolsclient} %{
|
||||
buffer '*grep*'
|
||||
execute-keys gg %opt{grep_current_line}g
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
define-command grep-previous-match -docstring 'Jump to the previous grep match' %{
|
||||
@ -69,5 +74,10 @@ define-command grep-previous-match -docstring 'Jump to the previous grep match'
|
||||
execute-keys "ge %opt{grep_current_line}g<a-h> <a-/>^[^:]+:\d+:<ret>"
|
||||
grep-jump
|
||||
}
|
||||
try %{ evaluate-commands -client %opt{toolsclient} %{ execute-keys gg %opt{grep_current_line}g } }
|
||||
try %{
|
||||
evaluate-commands -client %opt{toolsclient} %{
|
||||
buffer '*grep*'
|
||||
execute-keys gg %opt{grep_current_line}g
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user