Skip to content

Commit

Permalink
Allow configure size of quickfix and tmux panel (#162)
Browse files Browse the repository at this point in the history
  • Loading branch information
pbogut authored and tpope committed Aug 30, 2016
1 parent f1d0a5e commit a54f2c5
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
3 changes: 2 additions & 1 deletion autoload/dispatch.vim
Original file line number Diff line number Diff line change
Expand Up @@ -850,7 +850,8 @@ endfunction

function! s:open_quickfix(request, copen) abort
let was_qf = &buftype ==# 'quickfix'
execute 'botright' (a:copen ? 'copen' : 'cwindow')
let height = get(g:, 'dispatch_quickfix_height', 10)
execute 'botright' (a:copen ? 'copen'.height : 'cwindow'.height)
if &buftype ==# 'quickfix' && !was_qf && a:copen != 1
wincmd p
endif
Expand Down
3 changes: 2 additions & 1 deletion autoload/dispatch/tmux.vim
Original file line number Diff line number Diff line change
Expand Up @@ -47,12 +47,13 @@ function! dispatch#tmux#make(request) abort
\ (pipepane ? [a:request.expanded . '; echo $? > ' . a:request.file . '.complete'] : [])))

let title = shellescape(get(a:request, 'title', get(a:request, 'compiler', 'make')))
let height = get(g:, 'dispatch_tmux_height', 10)
if get(a:request, 'background', 0)
let cmd = 'new-window -d -n '.title
elseif has('gui_running') || empty($TMUX) || (!empty(''.session) && session !=# system('tmux display-message -p "#S"')[0:-2])
let cmd = 'new-window -n '.title
else
let cmd = 'split-window -l 10 -d'
let cmd = 'split-window -l '.height.' -d'
endif

let cmd .= ' ' . dispatch#shellescape('-P', '-t', session.':', 'exec ' . script)
Expand Down

0 comments on commit a54f2c5

Please sign in to comment.