diff --git a/autoload/dispatch.vim b/autoload/dispatch.vim index b7ea36e..2a69a68 100644 --- a/autoload/dispatch.vim +++ b/autoload/dispatch.vim @@ -843,7 +843,7 @@ endfunction " Quickfix window {{{1 function! dispatch#copen(bang, count) abort - if a:count != 0 + if a:count != 9999999 let g:dispatch_temporary_quickfix_height = a:count elseif has_key(g:, 'dispatch_temporary_quickfix_height') unlet g:dispatch_temporary_quickfix_height @@ -901,6 +901,13 @@ endfunction function! s:cwindow(request, all, copen) call s:cgetfile(a:request, a:all) let height = get(g:, 'dispatch_temporary_quickfix_height', get(g:, 'dispatch_quickfix_height', 10)) + if height <= 0 + if a:copen ==# -2 + " Show the user who explicitly called Copen that something was done + echo 'QuickFix list updated' + endif + return + endif let was_qf = s:is_quickfix() execute 'botright' (a:copen ? 'copen' : 'cwindow') height if !was_qf && s:is_quickfix() && a:copen !=# -2 diff --git a/plugin/dispatch.vim b/plugin/dispatch.vim index 2d8a518..4b4b7c7 100644 --- a/plugin/dispatch.vim +++ b/plugin/dispatch.vim @@ -25,7 +25,7 @@ command! -bang -nargs=* -complete=customlist,dispatch#command_complete Spawn command! -bang -nargs=* -complete=customlist,dispatch#command_complete Start \ execute dispatch#start_command(0, ) -command! -bang -count -bar Copen call dispatch#copen(0, ) +command! -bang -count=9999999 -bar Copen call dispatch#copen(0, ) function! DispatchComplete(id) abort return dispatch#complete(a:id)