Skip to content

Commit b0ce647

Browse files
committed
Simpler quickfix behavior
Previous behavior was based on my incorrect assumption that :cwindow would open for only invalid entries.
1 parent e204799 commit b0ce647

File tree

2 files changed

+2
-7
lines changed

2 files changed

+2
-7
lines changed

autoload/dispatch.vim

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -642,11 +642,7 @@ endfunction
642642

643643
function! s:open_quickfix(request, copen) abort
644644
let was_qf = &buftype ==# 'quickfix'
645-
if a:copen || !empty(filter(getqflist(), 'v:val.valid'))
646-
copen
647-
else
648-
cclose
649-
endif
645+
execute 'botright' (a:copen ? 'copen' : 'cwindow')
650646
if &buftype ==# 'quickfix' && !was_qf && !a:copen
651647
wincmd p
652648
endif

doc/dispatch.txt

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,7 @@ COMMANDS *dispatch-commands*
1616
build in the foreground. Adapter strategies vary, but
1717
the goal is visibility without stealing focus. When
1818
the build is complete, load the results into the
19-
|quickfix| list. The quickfix window is opened if
20-
there are any matching errors. This command is
19+
|quickfix| list and call |:cwindow|. This command is
2120
preferred for shorter tasks like "build this file."
2221

2322
:Make! [arguments] Using the current compiler settings, dispatch a build

0 commit comments

Comments
 (0)