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} + } +}