summaryrefslogtreecommitdiff
path: root/autoload
diff options
context:
space:
mode:
authorw0rp <devw0rp@gmail.com>2017-05-22 09:34:25 +0100
committerw0rp <devw0rp@gmail.com>2017-05-22 09:34:25 +0100
commit71bf2bfb94f19b99468b0115e3ea4efb5c241456 (patch)
treef7723ce87858567377aad6e4ccc94b87ceed1403 /autoload
parentc8ce15d9f180db4ae748539ea1cb9a840cbd360c (diff)
downloadale-71bf2bfb94f19b99468b0115e3ea4efb5c241456.zip
Fix #572 - Link to whatever SignColumn links to for ALESignColumnWithoutErrors
Diffstat (limited to 'autoload')
-rw-r--r--autoload/ale/sign.vim11
1 files changed, 9 insertions, 2 deletions
diff --git a/autoload/ale/sign.vim b/autoload/ale/sign.vim
index 521d7c30..09b774c1 100644
--- a/autoload/ale/sign.vim
+++ b/autoload/ale/sign.vim
@@ -34,8 +34,15 @@ if !hlexists('ALESignColumnWithoutErrors')
silent highlight SignColumn
redir end
- execute 'highlight ALESignColumnWithoutErrors '
- \ . join(split(l:output)[2:])
+ let l:highlight_syntax = join(split(l:output)[2:])
+
+ let l:match = matchlist(l:highlight_syntax, '\vlinks to (.+)$')
+
+ if !empty(l:match)
+ execute 'highlight link ALESignColumnWithoutErrors ' . l:match[1]
+ else
+ execute 'highlight ALESignColumnWithoutErrors ' . l:highlight_syntax
+ endif
endfunction
call s:SetSignColumnWithoutErrorsHighlight()