summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--plugin/ale.vim9
1 files changed, 4 insertions, 5 deletions
diff --git a/plugin/ale.vim b/plugin/ale.vim
index 46b3bba6..a49ea039 100644
--- a/plugin/ale.vim
+++ b/plugin/ale.vim
@@ -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>')))
-augroup END
-
-if exists('##VimSuspend')
- autocmd VimSuspend * call ale#engine#CleanupEveryBuffer()
-end
+ if exists('##VimSuspend')
+ autocmd VimSuspend * if exists('*ale#engine#CleanupEveryBuffer') | call ale#engine#CleanupEveryBuffer() | endif
+ endif
+augroup END