diff options
author | w0rp <devw0rp@gmail.com> | 2017-09-08 20:10:00 +0100 |
---|---|---|
committer | w0rp <devw0rp@gmail.com> | 2017-09-08 20:10:11 +0100 |
commit | 89cc8ca31485b986fe9f7139afe77712b89cca11 (patch) | |
tree | 66a593ed4aafa7123361991e328159f7626fa655 /autoload/ale/list.vim | |
parent | ff288366165804e8956013cca8c1291536cf9707 (diff) | |
download | ale-89cc8ca31485b986fe9f7139afe77712b89cca11.zip |
Fix #912 - Close lists automatically when g:ale_open_list is set to 'on_save' again
Diffstat (limited to 'autoload/ale/list.vim')
-rw-r--r-- | autoload/ale/list.vim | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/autoload/ale/list.vim b/autoload/ale/list.vim index fd8b62ef..bc8d4115 100644 --- a/autoload/ale/list.vim +++ b/autoload/ale/list.vim @@ -123,13 +123,19 @@ function! s:SetListsImpl(timer_id, buffer, loclist) abort " If ALE isn't currently checking for more problems, close the window if " needed now. This check happens inside of this timer function, so " the window can be closed reliably. - if !ale#engine#IsCheckingBuffer(bufnr('')) + if !ale#engine#IsCheckingBuffer(a:buffer) call s:CloseWindowIfNeeded(a:buffer) endif endfunction function! ale#list#SetLists(buffer, loclist) abort if get(g:, 'ale_set_lists_synchronously') == 1 + \|| getbufvar(a:buffer, 'ale_save_event_fired', 0) + " Update lists immediately if running a test synchronously, or if the + " buffer was saved. + " + " The lists need to be updated immediately when saving a buffer so + " that we can reliably close window automatically, if so configured. call s:SetListsImpl(-1, a:buffer, a:loclist) else call ale#util#StartPartialTimer( |