mirror of
https://github.com/gryf/pythonhelper.git
synced 2026-10-06 22:30:34 +02:00
Moved variable with script path out of function
Otherwise it will point to the current path, instead of script path. Changing it to script variables will change that behaviour to desirable one.
This commit is contained in:
1 parent
3164a9e568
commit
81a638762b
1 file changed
+6
-5
@@ -1,8 +1,8 @@
|
||||
" File: pythonhelper.vim
|
||||
" Author: Michal Vitecek <fuf-at-mageo-dot-cz>
|
||||
" Author: Roman Dobosz <gryf@vimja.com>
|
||||
" Version: 0.84
|
||||
" Last Modified: 2016-05-21
|
||||
" Version: 0.85
|
||||
" Last Modified: 2016-05-24
|
||||
"
|
||||
" Overview
|
||||
" --------
|
||||
@@ -33,15 +33,16 @@
|
||||
|
||||
" VIM functions {{{
|
||||
let g:pythonhelper_python = 'python'
|
||||
let s:plugin_path = expand('<sfile>:p:h', 1)
|
||||
|
||||
function! s:PHLoader()
|
||||
let l:plugin_path = escape(expand('<sfile>:p:h'), '\')
|
||||
|
||||
if !exists('g:pythonhelper_py_loaded')
|
||||
if has('python')
|
||||
exe 'pyfile ' . escape(l:plugin_path, ' ') . '/pythonhelper.py'
|
||||
exe 'pyfile ' . s:plugin_path . '/pythonhelper.py'
|
||||
elseif has('python3')
|
||||
let g:pythonhelper_python = 'python3'
|
||||
exe 'py3file ' . escape(l:plugin_path, ' ') . '/pythonhelper.py'
|
||||
exe 'py3file ' . s:plugin_path . '/pythonhelper.py'
|
||||
else
|
||||
echohl WarningMsg|echomsg
|
||||
\ "PythonHelper unavailable: "
|
||||
|
||||
Reference in new issue
Block a user