mirror of https://github.com/dense-analysis/ale
Fix #1205 Do not add line highlights if the groups do not exist
This commit is contained in:
parent
b6efb5649e
commit
7d932a239c
|
@ -95,6 +95,12 @@ function! ale#highlight#UpdateHighlights() abort
|
|||
" If highlights are enabled and signs are not enabled, we should still
|
||||
" offer line highlights by adding a separate set of highlights.
|
||||
if !g:ale_set_signs
|
||||
let l:available_groups = {
|
||||
\ 'ALEWarningLine': hlexists('ALEWarningLine'),
|
||||
\ 'ALEInfoLine': hlexists('ALEInfoLine'),
|
||||
\ 'ALEErrorLine': hlexists('ALEErrorLine'),
|
||||
\}
|
||||
|
||||
for l:item in l:item_list
|
||||
if l:item.type is# 'W'
|
||||
let l:group = 'ALEWarningLine'
|
||||
|
@ -104,7 +110,9 @@ function! ale#highlight#UpdateHighlights() abort
|
|||
let l:group = 'ALEErrorLine'
|
||||
endif
|
||||
|
||||
if l:available_groups[l:group]
|
||||
call matchaddpos(l:group, [l:item.lnum])
|
||||
endif
|
||||
endfor
|
||||
endif
|
||||
endfunction
|
||||
|
|
Loading…
Reference in New Issue