mirror of
https://github.com/powerline/powerline.git
synced 2025-07-22 05:14:58 +02:00
Fix name conflict in vim bindings
This commit is contained in:
parent
9d1392fa0d
commit
5313e61fe6
@ -155,7 +155,7 @@ class VimPowerline(Powerline):
|
|||||||
# requirements to __main__ globals to just one powerline object
|
# requirements to __main__ globals to just one powerline object
|
||||||
# (previously it required as well vim and json)
|
# (previously it required as well vim and json)
|
||||||
@staticmethod
|
@staticmethod
|
||||||
def pyeval():
|
def do_pyeval():
|
||||||
import __main__
|
import __main__
|
||||||
vim.command('return ' + json.dumps(eval(vim.eval('a:e'),
|
vim.command('return ' + json.dumps(eval(vim.eval('a:e'),
|
||||||
__main__.__dict__)))
|
__main__.__dict__)))
|
||||||
@ -199,7 +199,7 @@ def setup(pyeval=None, pycmd=None, can_replace_pyeval=True):
|
|||||||
if not hasattr(vim, 'bindeval') and can_replace_pyeval:
|
if not hasattr(vim, 'bindeval') and can_replace_pyeval:
|
||||||
vim.command(('''
|
vim.command(('''
|
||||||
function! PowerlinePyeval(e)
|
function! PowerlinePyeval(e)
|
||||||
{pycmd} powerline.pyeval()
|
{pycmd} powerline.do_pyeval()
|
||||||
endfunction
|
endfunction
|
||||||
''').format(pycmd=pycmd))
|
''').format(pycmd=pycmd))
|
||||||
pyeval = 'PowerlinePyeval'
|
pyeval = 'PowerlinePyeval'
|
||||||
|
Loading…
x
Reference in New Issue
Block a user