From b0ce64720d11f11239e48efe01a101b93f5bfa70 Mon Sep 17 00:00:00 2001 From: Tim Pope Date: Fri, 20 Jun 2014 11:11:52 -0400 Subject: [PATCH] Simpler quickfix behavior Previous behavior was based on my incorrect assumption that :cwindow would open for only invalid entries. --- autoload/dispatch.vim | 6 +----- doc/dispatch.txt | 3 +-- 2 files changed, 2 insertions(+), 7 deletions(-) diff --git a/autoload/dispatch.vim b/autoload/dispatch.vim index c77b089..e0ad4d9 100644 --- a/autoload/dispatch.vim +++ b/autoload/dispatch.vim @@ -642,11 +642,7 @@ endfunction function! s:open_quickfix(request, copen) abort let was_qf = &buftype ==# 'quickfix' - if a:copen || !empty(filter(getqflist(), 'v:val.valid')) - copen - else - cclose - endif + execute 'botright' (a:copen ? 'copen' : 'cwindow') if &buftype ==# 'quickfix' && !was_qf && !a:copen wincmd p endif diff --git a/doc/dispatch.txt b/doc/dispatch.txt index 61f360b..2fc69d1 100644 --- a/doc/dispatch.txt +++ b/doc/dispatch.txt @@ -16,8 +16,7 @@ COMMANDS *dispatch-commands* build in the foreground. Adapter strategies vary, but the goal is visibility without stealing focus. When the build is complete, load the results into the - |quickfix| list. The quickfix window is opened if - there are any matching errors. This command is + |quickfix| list and call |:cwindow|. This command is preferred for shorter tasks like "build this file." :Make! [arguments] Using the current compiler settings, dispatch a build