mirror of
https://github.com/neovim/neovim.git
synced 2025-12-19 12:55:32 +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 g:loaded_python_provider = 1
|
||||||
|
|
||||||
let [s:prog, s:err] = provider#pythonx#Detect(2)
|
let [s:prog, s:err] = provider#pythonx#Detect(2)
|
||||||
if s:prog == ''
|
|
||||||
" Detection failed
|
|
||||||
finish
|
|
||||||
endif
|
|
||||||
|
|
||||||
function! provider#python#Prog()
|
function! provider#python#Prog()
|
||||||
return s:prog
|
return s:prog
|
||||||
@@ -23,6 +19,11 @@ function! provider#python#Error()
|
|||||||
return s:err
|
return s:err
|
||||||
endfunction
|
endfunction
|
||||||
|
|
||||||
|
if s:prog == ''
|
||||||
|
" Detection failed
|
||||||
|
finish
|
||||||
|
endif
|
||||||
|
|
||||||
let s:plugin_path = expand('<sfile>:p:h').'/script_host.py'
|
let s:plugin_path = expand('<sfile>:p:h').'/script_host.py'
|
||||||
|
|
||||||
" The Python provider plugin will run in a separate instance of the Python
|
" The Python provider plugin will run in a separate instance of the Python
|
||||||
|
|||||||
@@ -10,10 +10,6 @@ endif
|
|||||||
let g:loaded_python3_provider = 1
|
let g:loaded_python3_provider = 1
|
||||||
|
|
||||||
let [s:prog, s:err] = provider#pythonx#Detect(3)
|
let [s:prog, s:err] = provider#pythonx#Detect(3)
|
||||||
if s:prog == ''
|
|
||||||
" Detection failed
|
|
||||||
finish
|
|
||||||
endif
|
|
||||||
|
|
||||||
function! provider#python3#Prog()
|
function! provider#python3#Prog()
|
||||||
return s:prog
|
return s:prog
|
||||||
@@ -23,6 +19,11 @@ function! provider#python3#Error()
|
|||||||
return s:err
|
return s:err
|
||||||
endfunction
|
endfunction
|
||||||
|
|
||||||
|
if s:prog == ''
|
||||||
|
" Detection failed
|
||||||
|
finish
|
||||||
|
endif
|
||||||
|
|
||||||
let s:plugin_path = expand('<sfile>:p:h').'/script_host.py'
|
let s:plugin_path = expand('<sfile>:p:h').'/script_host.py'
|
||||||
|
|
||||||
" The Python3 provider plugin will run in a separate instance of the Python3
|
" The Python3 provider plugin will run in a separate instance of the Python3
|
||||||
|
|||||||
Reference in New Issue
Block a user