Skip to content

Commit 00e77d9

Browse files
authored
Do not attempt to close last window if quickfix with no errors
Resolves: #323
1 parent 527f200 commit 00e77d9

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

autoload/dispatch.vim

+5-1
Original file line numberDiff line numberDiff line change
@@ -1362,7 +1362,11 @@ function! s:cwindow(request, all, copen, mods, event) abort
13621362
if mods !~# 'aboveleft\|belowright\|leftabove\|rightbelow\|topleft\|botright'
13631363
let mods = 'botright ' . mods
13641364
endif
1365-
execute (mods) (a:copen ? 'copen' : 'cwindow') height
1365+
if a:copen
1366+
execute (mods) 'copen' height
1367+
elseif !was_qf || winnr('$') > 1
1368+
execute (mods) 'cwindow' height
1369+
endif
13661370
if !was_qf && s:is_quickfix() && a:copen !=# -2
13671371
wincmd p
13681372
endif

0 commit comments

Comments
 (0)