Fix #1404 - Do not show balloons when g:ale_set_balloons is 0. Add b:ale_set_balloons

This commit is contained in:
w0rp
2018-03-25 12:57:08 +01:00
parent 107516c757
commit 164c711b3d
5 changed files with 107 additions and 17 deletions

View File

@@ -84,10 +84,6 @@ function! s:EnablePreamble() abort
" Lint immediately, including running linters against the file.
call ale#Queue(0, 'lint_file')
if g:ale_set_balloons
call ale#balloon#Enable()
endif
endfunction
function! s:DisablePostamble() abort
@@ -95,10 +91,6 @@ function! s:DisablePostamble() abort
if g:ale_set_highlights
call ale#highlight#UpdateHighlights()
endif
if g:ale_set_balloons
call ale#balloon#Disable()
endif
endfunction
function! s:CleanupEveryBuffer() abort
@@ -121,9 +113,17 @@ function! ale#toggle#Toggle() abort
if g:ale_enabled
call s:EnablePreamble()
if g:ale_set_balloons
call ale#balloon#Enable()
endif
else
call s:CleanupEveryBuffer()
call s:DisablePostamble()
if has('balloon_eval')
call ale#balloon#Disable()
endif
endif
call ale#toggle#InitAuGroups()