Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add a count to Copen to set quickfix height #207

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 6 additions & 1 deletion autoload/dispatch.vim
Original file line number Diff line number Diff line change
Expand Up @@ -842,7 +842,12 @@ endfunction
" }}}1
" Quickfix window {{{1

function! dispatch#copen(bang) abort
function! dispatch#copen(bang, count) abort
if a:count != 0
let g:dispatch_quickfix_height = a:count
elseif has_key(g:, 'dispatch_quickfix_height')
unlet g:dispatch_quickfix_height
endif
if empty(s:makes)
return 'echoerr ' . string('No dispatches yet')
endif
Expand Down
2 changes: 1 addition & 1 deletion plugin/dispatch.vim
Original file line number Diff line number Diff line change
Expand Up @@ -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(<bang>0, <q-args>)

command! -bang -bar Copen call dispatch#copen(<bang>0)
command! -bang -count -bar Copen call dispatch#copen(<bang>0, <count>)

function! DispatchComplete(id) abort
return dispatch#complete(a:id)
Expand Down