make,grep: focus jumpclient when jumping to location

This commit is contained in:
Maxime Coste 2014-04-07 23:46:37 +01:00
parent 95f6f0bae9
commit 960f823bcd
2 changed files with 3 additions and 0 deletions

View File

@ -31,4 +31,5 @@ decl str jumpclient
def jump %{
exec 'xs^([^:]+):(\d+):(\d+)?<ret>'
eval -try-client %opt{jumpclient} edit %reg{1} %reg{2} %reg{3}
try %{ focus %opt{jumpclient} }
}

View File

@ -30,8 +30,10 @@ def errjump -docstring 'Jump to error location' %{
exec gll<a-?> "Entering directory" <ret>
exec s "Entering directory '([^']+)'.*\n([^:]+):(\d+):(\d+):[^\n]+\'" <ret>l
eval -try-client %opt{jumpclient} edit %rec{%reg{1}/%reg{2}} %reg{3} %reg{4}
try %{ focus %opt{jumpclient} }
} catch %{
exec ghgl s "([^:]+):(\d+):(\d+):[^\n]+\'" <ret>l
eval -try-client %opt{jumpclient} edit %reg{1} %reg{2} %reg{3}
try %{ focus %opt{jumpclient} }
}
}