Join the ALECleanupGroup and ensure we don't run cleanup if ale.vim isn't loaded
This commit is contained in:
parent
fba4cfeae9
commit
cbf0568061
@ -217,9 +217,8 @@ augroup ALECleanupGroup
|
|||||||
" Clean up buffers automatically when they are unloaded.
|
" Clean up buffers automatically when they are unloaded.
|
||||||
autocmd BufDelete * if exists('*ale#engine#Cleanup') | call ale#engine#Cleanup(str2nr(expand('<abuf>'))) | endif
|
autocmd BufDelete * if exists('*ale#engine#Cleanup') | call ale#engine#Cleanup(str2nr(expand('<abuf>'))) | endif
|
||||||
autocmd QuitPre * call ale#events#QuitEvent(str2nr(expand('<abuf>')))
|
autocmd QuitPre * call ale#events#QuitEvent(str2nr(expand('<abuf>')))
|
||||||
|
|
||||||
|
if exists('##VimSuspend')
|
||||||
|
autocmd VimSuspend * if exists('*ale#engine#CleanupEveryBuffer') | call ale#engine#CleanupEveryBuffer() | endif
|
||||||
|
endif
|
||||||
augroup END
|
augroup END
|
||||||
|
|
||||||
if exists('##VimSuspend')
|
|
||||||
autocmd VimSuspend * call ale#engine#CleanupEveryBuffer()
|
|
||||||
end
|
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user