From 6f37426f7ab3d01c5be648fa39cb9c70857e6dbc Mon Sep 17 00:00:00 2001 From: Bob Hiestand Date: Wed, 6 Jul 2011 10:39:24 -0500 Subject: [PATCH] allow VCSCommandVCSTypePreference to be specified at all scopes --- plugin/vcscommand.vim | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/plugin/vcscommand.vim b/plugin/vcscommand.vim index e3d22d6..3863e35 100644 --- a/plugin/vcscommand.vim +++ b/plugin/vcscommand.vim @@ -1069,8 +1069,9 @@ function! VCSCommandGetVCSType(buffer) elseif len(matches) == 0 throw 'No suitable plugin' else - if exists("g:VCSCommandVCSTypePreference") - for preferred in split(g:VCSCommandVCSTypePreference, '\W\+') + let preferences = VCSCommandGetOption("VCSCommandVCSTypePreference", "") + if len(preferences) > 0 + for preferred in split(preferences, '\W\+') for vcsType in matches if toupper(vcsType) == toupper(preferred) call setbufvar(a:buffer, 'VCSCommandVCSType', vcsType) -- 2.11.4.GIT