summaryrefslogtreecommitdiff
path: root/autoload
diff options
context:
space:
mode:
authorw0rp <devw0rp@gmail.com>2017-09-12 21:17:54 +0100
committerw0rp <devw0rp@gmail.com>2017-09-12 21:17:54 +0100
commit91df9ba2c0ccbe53e7838d16642e00c6280eefaa (patch)
tree3c1e64596c12c2815075b4f9725a5cb71c73492c /autoload
parent4e9420d1f581d72bef17554b36073cca584a752f (diff)
downloadale-91df9ba2c0ccbe53e7838d16642e00c6280eefaa.zip
Fix #924 - Make changing the sign column color work again
Diffstat (limited to 'autoload')
-rw-r--r--autoload/ale/sign.vim22
1 files changed, 12 insertions, 10 deletions
diff --git a/autoload/ale/sign.vim b/autoload/ale/sign.vim
index 7ba83647..b8d781dc 100644
--- a/autoload/ale/sign.vim
+++ b/autoload/ale/sign.vim
@@ -184,16 +184,6 @@ function! s:GroupLoclistItems(buffer, loclist) abort
return l:grouped_items
endfunction
-function! ale#sign#SetSignColumnHighlight(has_problems) abort
- highlight clear SignColumn
-
- if a:has_problems
- highlight link SignColumn ALESignColumnWithErrors
- else
- highlight link SignColumn ALESignColumnWithoutErrors
- endif
-endfunction
-
function! s:UpdateLineNumbers(buffer, current_sign_list, loclist) abort
let l:line_map = {}
let l:line_numbers_changed = 0
@@ -347,7 +337,19 @@ function! ale#sign#SetSigns(buffer, loclist) abort
\ l:sign_map,
\)
+ " Change the sign column color if the option is on.
+ if g:ale_change_sign_column_color && !empty(a:loclist)
+ highlight clear SignColumn
+ highlight link SignColumn ALESignColumnWithErrors
+ endif
+
for l:command in l:command_list
silent! execute l:command
endfor
+
+ " Reset the sign column color when there are no more errors.
+ if g:ale_change_sign_column_color && empty(a:loclist)
+ highlight clear SignColumn
+ highlight link SignColumn ALESignColumnWithoutErrors
+ endif
endfunction