Join the ALECleanupGroup and ensure we don't run cleanup if ale.vim isn't loaded

This commit is contained in:
Felipe Sere
2018-09-17 15:50:04 +01:00
parent fba4cfeae9
commit cbf0568061

View File

@@ -217,9 +217,8 @@ augroup ALECleanupGroup
" Clean up buffers automatically when they are unloaded.
autocmd BufDelete * if exists('*ale#engine#Cleanup') | call ale#engine#Cleanup(str2nr(expand('<abuf>'))) | endif
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
if exists('##VimSuspend')
autocmd VimSuspend * call ale#engine#CleanupEveryBuffer()
end