From 69d6ff602028bad13f1522e0770864e43a58427f Mon Sep 17 00:00:00 2001 From: w0rp Date: Sat, 14 Oct 2017 19:22:19 +0100 Subject: [PATCH] #904 Do less processing when newer NeoVim versions are exiting --- autoload/ale.vim | 5 +++++ autoload/ale/engine.vim | 5 +++++ 2 files changed, 10 insertions(+) diff --git a/autoload/ale.vim b/autoload/ale.vim index 0f916c2..3c5f047 100644 --- a/autoload/ale.vim +++ b/autoload/ale.vim @@ -46,6 +46,11 @@ function! ale#ShouldDoNothing(buffer) abort " The checks are split into separate if statements to make it possible to " profile each check individually with Vim's profiling tools. + " Don't perform any checks when newer NeoVim versions are exiting. + if get(v:, 'exiting', v:null) isnot v:null + return 1 + endif + " Do nothing for blacklisted files if index(g:ale_filetype_blacklist, &filetype) >= 0 return 1 diff --git a/autoload/ale/engine.vim b/autoload/ale/engine.vim index 29cb44f..890d3df 100644 --- a/autoload/ale/engine.vim +++ b/autoload/ale/engine.vim @@ -801,6 +801,11 @@ endfunction " clear the state of everything, and remove the Dictionary for managing " the buffer. function! ale#engine#Cleanup(buffer) abort + " Don't bother with cleanup code when newer NeoVim versions are exiting. + if get(v:, 'exiting', v:null) isnot v:null + return + endif + if !has_key(g:ale_buffer_info, a:buffer) return endif