From 615f6608f16fc806d1f31b2f5ced136f2277127e Mon Sep 17 00:00:00 2001 From: Tim Pope Date: Fri, 7 Sep 2012 01:15:48 -0400 Subject: [PATCH] Allow pass through to ctrlp.vim in :Gstatus This only works on the first line. Any more than that, and we'll have to give up on the whole map entirely (which is not off the table). --- plugin/fugitive.vim | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/plugin/fugitive.vim b/plugin/fugitive.vim index d741029..3c302cf 100644 --- a/plugin/fugitive.vim +++ b/plugin/fugitive.vim @@ -706,10 +706,14 @@ function! s:StageNext(count) endfunction function! s:StagePrevious(count) - for i in range(a:count) - call search('^#\t.*','Wbe') - endfor - return '.' + if line('.') == 1 && exists(':CtrlP') + return 'CtrlP '.fnameescape(s:repo().tree()) + else + for i in range(a:count) + call search('^#\t.*','Wbe') + endfor + return '.' + endif endfunction function! s:StageReloadSeek(target,lnum1,lnum2)