From 7ca8d032cbe1d714d07cefe8b064696c7f161cd4 Mon Sep 17 00:00:00 2001 From: Bob Hiestand Date: Thu, 7 Jul 2011 12:22:38 -0500 Subject: [PATCH] add 'VCSCommandVCSTypeExplicitOverride' for a more dynamic switch --- plugin/vcscommand.vim | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/plugin/vcscommand.vim b/plugin/vcscommand.vim index 05ac69e..349513e 100644 --- a/plugin/vcscommand.vim +++ b/plugin/vcscommand.vim @@ -1102,10 +1102,13 @@ endfunction " 7. error if no matching types function! VCSCommandGetVCSType(buffer) - let vcsType = getbufvar(a:buffer, 'VCSCommandVCSType') - if strlen(vcsType) == 0 - let vcsType = s:IdentifyVCSType(a:buffer) - call setbufvar(a:buffer, 'VCSCommandVCSType', vcsType) + let vcsType = VCSCommandGetOption('VCSCommandVCSTypeExplicitOverride', '') + if len(vcsType) == 0 + let vcsType = getbufvar(a:buffer, 'VCSCommandVCSType') + if strlen(vcsType) == 0 + let vcsType = s:IdentifyVCSType(a:buffer) + call setbufvar(a:buffer, 'VCSCommandVCSType', vcsType) + endif endif return vcsType endfunction -- 2.11.4.GIT