mirror of
https://github.com/dense-analysis/ale
synced 2024-12-22 14:13:12 +00:00
Avoid calling ALE cleanup code if ALE never tried to check a buffer
This commit is contained in:
parent
b8a1038a41
commit
e306e5cdb0
@ -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')
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user