diff options
author | w0rp <devw0rp@gmail.com> | 2017-02-13 23:31:29 +0000 |
---|---|---|
committer | w0rp <devw0rp@gmail.com> | 2017-02-13 23:31:29 +0000 |
commit | f39e88cfa8d81d54e65ae05678fbfb735f793828 (patch) | |
tree | 3d9ee89df00d67beaca41d14f531786fcde2f663 /autoload | |
parent | c0814934af98c47cdfcd3c4e7a290cef30f1a4a0 (diff) | |
download | ale-f39e88cfa8d81d54e65ae05678fbfb735f793828.zip |
#274 - Fix airline integration when ALE is not loaded fully
Diffstat (limited to 'autoload')
-rw-r--r-- | autoload/ale/statusline.vim | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/autoload/ale/statusline.vim b/autoload/ale/statusline.vim index 7269ddca..efb7e9e5 100644 --- a/autoload/ale/statusline.vim +++ b/autoload/ale/statusline.vim @@ -3,6 +3,10 @@ " Update the buffer error/warning count with data from loclist. function! ale#statusline#Update(buffer, loclist) abort + if !exists('g:ale_buffer_info') + return + endif + if !has_key(g:ale_buffer_info, a:buffer) return endif @@ -39,6 +43,10 @@ endfunction " Returns a tuple of errors and warnings for use in third-party integrations. function! ale#statusline#Count(buffer) abort + if !exists('g:ale_buffer_info') + return [0, 0] + endif + if !s:SetupCount(a:buffer) return [0, 0] endif @@ -48,6 +56,10 @@ endfunction " Returns a formatted string that can be integrated in the statusline. function! ale#statusline#Status() abort + if !exists('g:ale_buffer_info') + return 'OK' + endif + let [l:error_format, l:warning_format, l:no_errors] = g:ale_statusline_format let l:buffer = bufnr('%') |