Optimize python check for Neovim: skip has() calls

This commit is contained in:
Daniel Hahler
2015-04-14 19:27:35 +02:00
parent 8f7f07fb58
commit 7784c29a59

View File

@@ -352,7 +352,9 @@ function! jedi#get_force_py_version()
return g:jedi#force_py_version
endfunction
if has('python') && has('python3')
" NOTE: nvim usually has both python providers. Skipping the `has` check
" avoids starting both of them.
if has('nvim') || (has('python') && has('python3'))
" Use default python with Jedi.
call jedi#force_py_version(jedi#get_force_py_version())
elseif has('python')