From c7997ecdd89b780a1a193551216efed68d042cf2 Mon Sep 17 00:00:00 2001 From: gryf Date: Fri, 9 Dec 2011 07:31:34 +0100 Subject: [PATCH] Updated vcscommand plugin --- GetLatest/GetLatestVimScripts.dat | 5 +++-- plugin/vcscommand.vim | 7 +++++-- 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/GetLatest/GetLatestVimScripts.dat b/GetLatest/GetLatestVimScripts.dat index 7ef35b8..639f35a 100644 --- a/GetLatest/GetLatestVimScripts.dat +++ b/GetLatest/GetLatestVimScripts.dat @@ -17,11 +17,12 @@ ScriptID SourceID Filename 152 3342 showmarks.vim 2540 11006 snipMate.vim 1697 12566 :AutoInstall: surround.vim -3465 15751 Tagbar -90 16705 vcscommand.vim +3465 16977 Tagbar +90 17031 vcscommand.vim 2226 15854 vimwiki.vim 1334 6377 vst.vim 2321 9055 zoom.vim +52 14880 calendar.vim ### colors 2855 12456 github.vim 1143 11833 inkpot.vim diff --git a/plugin/vcscommand.vim b/plugin/vcscommand.vim index 1ea79b6..2726436 100644 --- a/plugin/vcscommand.vim +++ b/plugin/vcscommand.vim @@ -818,6 +818,7 @@ function! s:VCSAnnotate(bang, ...) if splitRegex == '' return annotateBuffer endif + wincmd J let originalFileType = getbufvar(originalBuffer, '&ft') let annotateFileType = getbufvar(annotateBuffer, '&ft') @@ -1081,9 +1082,11 @@ function! s:VCSVimDiff(...) \ . '|call setbufvar('.originalBuffer.', ''&foldmethod'', '''.getbufvar(originalBuffer, '&foldmethod').''')' \ . '|call setbufvar('.originalBuffer.', ''&foldlevel'', '''.getbufvar(originalBuffer, '&foldlevel').''')' \ . '|call setbufvar('.originalBuffer.', ''&scrollbind'', '.getbufvar(originalBuffer, '&scrollbind').')' - \ . '|call setbufvar('.originalBuffer.', ''&cursorbind'', '.getbufvar(originalBuffer, '&cursorbind').')' \ . '|call setbufvar('.originalBuffer.', ''&wrap'', '.getbufvar(originalBuffer, '&wrap').')' - \ . '|if &foldmethod==''manual''|execute ''normal! zE''|endif' + if has('cursorbind') + let t:vcsCommandVimDiffRestoreCmd .= '|call setbufvar('.originalBuffer.', ''&cursorbind'', '.getbufvar(originalBuffer, '&cursorbind').')' + endif + let t:vcsCommandVimDiffRestoreCmd .= '|if &foldmethod==''manual''|execute ''normal! zE''|endif' diffthis wincmd w else