mirror of
https://github.com/powerline/powerline.git
synced 2025-07-29 08:45:15 +02:00
Merge branch 'fix-ipython' into develop
This commit is contained in:
commit
908c575223
@ -23,7 +23,8 @@ class ConfigurableIPythonPowerline(IPythonPowerline):
|
|||||||
def do_setup(self, ip, prompts, shutdown_hook):
|
def do_setup(self, ip, prompts, shutdown_hook):
|
||||||
prompts.powerline = self
|
prompts.powerline = self
|
||||||
|
|
||||||
saved_msfn = ip._make_style_from_name
|
msfn_missing = ()
|
||||||
|
saved_msfn = getattr(ip, '_make_style_from_name', msfn_missing)
|
||||||
|
|
||||||
if hasattr(saved_msfn, 'powerline_original'):
|
if hasattr(saved_msfn, 'powerline_original'):
|
||||||
saved_msfn = saved_msfn.powerline_original
|
saved_msfn = saved_msfn.powerline_original
|
||||||
@ -43,6 +44,7 @@ class ConfigurableIPythonPowerline(IPythonPowerline):
|
|||||||
_saved_msfn = saved_msfn
|
_saved_msfn = saved_msfn
|
||||||
saved_msfn = lambda: _saved_msfn(ip)
|
saved_msfn = lambda: _saved_msfn(ip)
|
||||||
|
|
||||||
|
if saved_msfn is not msfn_missing:
|
||||||
ip._make_style_from_name = _make_style_from_name
|
ip._make_style_from_name = _make_style_from_name
|
||||||
|
|
||||||
magics = PowerlineMagics(ip, self)
|
magics = PowerlineMagics(ip, self)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user