Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit6c59a31

Browse files
committed
Add a count to Copen to set quickfix height
1 parent14a1695 commit6c59a31

File tree

3 files changed

+9
-4
lines changed

3 files changed

+9
-4
lines changed

‎autoload/dispatch.vim‎

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -842,7 +842,12 @@ endfunction
842842
" }}}1
843843
" Quickfix window {{{1
844844

845-
function!dispatch#copen(bang)abort
845+
function!dispatch#copen(bang,count)abort
846+
ifa:count!=0
847+
letg:dispatch_temporary_quickfix_height=a:count
848+
elseifhas_key(g:,'dispatch_temporary_quickfix_height')
849+
unletg:dispatch_temporary_quickfix_height
850+
endif
846851
ifempty(s:makes)
847852
return'echoerr' .string('No dispatches yet')
848853
endif
@@ -895,7 +900,7 @@ endfunction
895900

896901
function!s:cwindow(request,all,copen)
897902
calls:cgetfile(a:request,a:all)
898-
let height=get(g:,'dispatch_quickfix_height',10)
903+
let height=get(g:,'dispatch_temporary_quickfix_height',get(g:,'dispatch_quickfix_height',10))
899904
let was_qf=s:is_quickfix()
900905
execute'botright' (a:copen ?'copen' :'cwindow') height
901906
if!was_qf&&s:is_quickfix()&&a:copen!=#-2

‎autoload/dispatch/tmux.vim‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ function! dispatch#tmux#make(request) abort
4848
\ .' >' .a:request.file .'.complete'] : [])))
4949

5050
lettitle=shellescape(get(a:request,'title',get(a:request,'compiler','make')))
51-
let height=get(g:,'dispatch_tmux_height',get(g:,'dispatch_quickfix_height',10))
51+
let height=get(g:,'dispatch_tmux_height',get(g:,'dispatch_temporary_quickfix_height',get(g:,'dispatch_quickfix_height',10)))
5252
ifget(a:request,'background',0)
5353
let cmd='new-window -d -n'.title
5454
elseifhas('gui_running')||empty($TMUX)|| (!empty(''.session)&& session!=#system('tmux display-message -p "#S"')[0:-2])

‎plugin/dispatch.vim‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ command! -bang -nargs=* -complete=customlist,dispatch#command_complete Spawn
2525
command!-bang -nargs=* -complete=customlist,dispatch#command_complete Start
2626
\executedispatch#start_command(<bang>0,<q-args>)
2727

28-
command!-bang-bar Copencalldispatch#copen(<bang>0)
28+
command!-bang-count-bar Copencalldispatch#copen(<bang>0,<count>)
2929

3030
function!DispatchComplete(id)abort
3131
returndispatch#complete(a:id)

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp