mirror of
https://github.com/neovim/neovim.git
synced 2025-12-15 19:05:40 +00:00
provider/python: define Prog and Error functions always
`provider#pythonX#Error` and `provider#pythonX#Prog` are currently meant for debugging only (the error message is not being used), and should therefore be defined always, especially in case of errors. Ref: https://github.com/neovim/neovim/pull/2549#issuecomment-98607580
This commit is contained in:
committed by
Florian Walch
parent
3b0ec6599c
commit
866e587b88
@@ -10,10 +10,6 @@ endif
|
||||
let g:loaded_python_provider = 1
|
||||
|
||||
let [s:prog, s:err] = provider#pythonx#Detect(2)
|
||||
if s:prog == ''
|
||||
" Detection failed
|
||||
finish
|
||||
endif
|
||||
|
||||
function! provider#python#Prog()
|
||||
return s:prog
|
||||
@@ -23,6 +19,11 @@ function! provider#python#Error()
|
||||
return s:err
|
||||
endfunction
|
||||
|
||||
if s:prog == ''
|
||||
" Detection failed
|
||||
finish
|
||||
endif
|
||||
|
||||
let s:plugin_path = expand('<sfile>:p:h').'/script_host.py'
|
||||
|
||||
" The Python provider plugin will run in a separate instance of the Python
|
||||
|
||||
Reference in New Issue
Block a user