Avoid calling ALE cleanup code if ALE never tried to check a buffer
This commit is contained in:
parent
b8a1038a41
commit
e306e5cdb0
2 changed files with 2 additions and 2 deletions
|
@ -228,7 +228,7 @@ call ale#autocmd#InitAuGroups()
|
|||
augroup ALECleanupGroup
|
||||
autocmd!
|
||||
" Clean up buffers automatically when they are unloaded.
|
||||
autocmd BufDelete * call ale#engine#Cleanup(str2nr(expand('<abuf>')))
|
||||
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
|
||||
|
||||
|
|
|
@ -191,7 +191,7 @@ Execute (g:ale_echo_cursor = 1 should bind cursor events):
|
|||
|
||||
Execute (ALECleanupGroup should include the right commands):
|
||||
AssertEqual [
|
||||
\ 'BufDelete * call ale#engine#Cleanup(str2nr(expand(''<abuf>'')))',
|
||||
\ 'BufDelete * if exists(''*ale#engine#Cleanup'') | call ale#engine#Cleanup(str2nr(expand(''<abuf>''))) | endif',
|
||||
\ 'QuitPre * call ale#events#QuitEvent(str2nr(expand(''<abuf>'')))',
|
||||
\], CheckAutocmd('ALECleanupGroup')
|
||||
|
||||
|
|
Reference in a new issue