From 6b8d900b057c09b3704b2c40d1c25998650ba51a Mon Sep 17 00:00:00 2001 From: Daniel Hahler Date: Fri, 18 Mar 2016 23:06:41 +0100 Subject: [PATCH] Use echoerr in jedi#init_python This will abort the script, instead of finishing there only. --- autoload/jedi.vim | 16 +++++----------- 1 file changed, 5 insertions(+), 11 deletions(-) diff --git a/autoload/jedi.vim b/autoload/jedi.vim index 49e9d0a..aa9aee0 100644 --- a/autoload/jedi.vim +++ b/autoload/jedi.vim @@ -126,12 +126,11 @@ function! jedi#init_python() try let s:_init_python = s:init_python() catch - if !exists("g:jedi#squelch_py_warning") - echohl WarningMsg - echom "Error: jedi-vim failed to initialize Python: ".v:exception." (in ".v:throwpoint.")" - echohl None - endif let s:_init_python = 0 + if !exists("g:jedi#squelch_py_warning") + echoerr "Error: jedi-vim failed to initialize Python: " + \ .v:exception." (in ".v:throwpoint.")" + endif endtry endif return s:_init_python @@ -202,12 +201,7 @@ function! jedi#_vim_exceptions(str, is_eval) return l:result endfunction - -if !jedi#init_python() - " Do not define any functions when Python initialization failed. - finish -endif - +call jedi#init_python() " Might throw an error. " ------------------------------------------------------------------------ " functions that call python code