From 733de48efca95979bf596b8ae1d695bf6af4e55d Mon Sep 17 00:00:00 2001 From: Strahinja Val Markovic Date: Thu, 4 Sep 2014 13:12:37 -0700 Subject: [PATCH] Better handling of issues during python setup Fixes #1151 --- autoload/youcompleteme.vim | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/autoload/youcompleteme.vim b/autoload/youcompleteme.vim index 663bd4a0..cd838216 100644 --- a/autoload/youcompleteme.vim +++ b/autoload/youcompleteme.vim @@ -45,7 +45,9 @@ function! youcompleteme#Enable() call s:SetUpBackwardsCompatibility() - if !s:SetUpPython() + " This can be 0 if YCM libs are old or -1 if an exception occured while + " executing the function. + if s:SetUpPython() != 1 return endif @@ -91,7 +93,7 @@ function! youcompleteme#Enable() endfunction -function! s:SetUpPython() +function! s:SetUpPython() abort py import sys py import vim exe 'python sys.path.insert( 0, "' . s:script_folder_path . '/../python" )'