From 6966bf3303db559df046c91d11d326f446da7c6e Mon Sep 17 00:00:00 2001 From: Maxime Coste Date: Fri, 13 Dec 2013 13:58:12 +0000 Subject: [PATCH] make.kak: errjump tries to recognize current make directory --- src/rc/make.kak | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/src/rc/make.kak b/src/rc/make.kak index 37d299a4..7ea15934 100644 --- a/src/rc/make.kak +++ b/src/rc/make.kak @@ -23,4 +23,14 @@ hook global WinSetOption filetype=make %{ hook global WinSetOption filetype=(?!make).* %{ rmhl make; rmhooks buffer make-hooks } -def errjump %{ exec 'xs^([^:\n]+):(\d+)(?::(\d+))?:(.*?)$'; edit %reg{1} %reg{2} %reg{3}; echo %reg{4} } +def errjump %{ + try %{ + exec gll "Entering directory" + exec s "Entering directory '([^']+)'.*\n([^:]+):(\d+):(\d+):[^\n]+\'" l + #edit "%reg{1}/%reg{2}" %reg{3} %reg{4} + exec :edit1/234 + } catch %{ + exec ghgl s "([^:]+):(\d+):(\d+):[^\n]+\'" l + edit %reg{1} %reg{2} %reg{3} + } +}