Fix #796 - Ignore errors for closing the last window
This commit is contained in:
parent
e0c014ab8c
commit
e45c16d9bb
1 changed files with 12 additions and 8 deletions
|
@ -59,13 +59,17 @@ function! ale#list#CloseWindowIfNeeded(buffer) abort
|
||||||
return
|
return
|
||||||
endif
|
endif
|
||||||
|
|
||||||
" Only close windows if the quickfix list or loclist is completely empty,
|
try
|
||||||
" including errors set through other means.
|
" Only close windows if the quickfix list or loclist is completely empty,
|
||||||
if g:ale_set_quickfix
|
" including errors set through other means.
|
||||||
if empty(getqflist())
|
if g:ale_set_quickfix
|
||||||
cclose
|
if empty(getqflist())
|
||||||
|
cclose
|
||||||
|
endif
|
||||||
|
elseif g:ale_set_loclist && empty(getloclist(0))
|
||||||
|
lclose
|
||||||
endif
|
endif
|
||||||
elseif g:ale_set_loclist && empty(getloclist(0))
|
" Ignore 'Cannot close last window' errors.
|
||||||
lclose
|
catch /E444/
|
||||||
endif
|
endtry
|
||||||
endfunction
|
endfunction
|
||||||
|
|
Reference in a new issue