From 960f823bcd81e1bb036ac99d9bcca7c2bd2e4653 Mon Sep 17 00:00:00 2001 From: Maxime Coste Date: Mon, 7 Apr 2014 23:46:37 +0100 Subject: [PATCH] make,grep: focus jumpclient when jumping to location --- rc/grep.kak | 1 + rc/make.kak | 2 ++ 2 files changed, 3 insertions(+) diff --git a/rc/grep.kak b/rc/grep.kak index 7f7cbe10..3f9ec56e 100644 --- a/rc/grep.kak +++ b/rc/grep.kak @@ -31,4 +31,5 @@ decl str jumpclient def jump %{ exec 'xs^([^:]+):(\d+):(\d+)?' eval -try-client %opt{jumpclient} edit %reg{1} %reg{2} %reg{3} + try %{ focus %opt{jumpclient} } } diff --git a/rc/make.kak b/rc/make.kak index a9727917..43219e04 100644 --- a/rc/make.kak +++ b/rc/make.kak @@ -30,8 +30,10 @@ def errjump -docstring 'Jump to error location' %{ exec gll "Entering directory" exec s "Entering directory '([^']+)'.*\n([^:]+):(\d+):(\d+):[^\n]+\'" 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]+\'" l eval -try-client %opt{jumpclient} edit %reg{1} %reg{2} %reg{3} + try %{ focus %opt{jumpclient} } } }