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,6 +59,7 @@ function! ale#list#CloseWindowIfNeeded(buffer) abort
|
|||
return
|
||||
endif
|
||||
|
||||
try
|
||||
" Only close windows if the quickfix list or loclist is completely empty,
|
||||
" including errors set through other means.
|
||||
if g:ale_set_quickfix
|
||||
|
@ -68,4 +69,7 @@ function! ale#list#CloseWindowIfNeeded(buffer) abort
|
|||
elseif g:ale_set_loclist && empty(getloclist(0))
|
||||
lclose
|
||||
endif
|
||||
" Ignore 'Cannot close last window' errors.
|
||||
catch /E444/
|
||||
endtry
|
||||
endfunction
|
||||
|
|
Reference in a new issue