mirror of
https://github.com/dense-analysis/ale.git
synced 2025-12-08 05:24:46 +08:00
Fix #796 - Ignore errors for closing the last window
This commit is contained in:
@@ -59,6 +59,7 @@ function! ale#list#CloseWindowIfNeeded(buffer) abort
|
|||||||
return
|
return
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
try
|
||||||
" Only close windows if the quickfix list or loclist is completely empty,
|
" Only close windows if the quickfix list or loclist is completely empty,
|
||||||
" including errors set through other means.
|
" including errors set through other means.
|
||||||
if g:ale_set_quickfix
|
if g:ale_set_quickfix
|
||||||
@@ -68,4 +69,7 @@ function! ale#list#CloseWindowIfNeeded(buffer) abort
|
|||||||
elseif g:ale_set_loclist && empty(getloclist(0))
|
elseif g:ale_set_loclist && empty(getloclist(0))
|
||||||
lclose
|
lclose
|
||||||
endif
|
endif
|
||||||
|
" Ignore 'Cannot close last window' errors.
|
||||||
|
catch /E444/
|
||||||
|
endtry
|
||||||
endfunction
|
endfunction
|
||||||
|
|||||||
Reference in New Issue
Block a user