From 06ee4de05f4bfd56fc3eb31bad67520cc91c58b9 2016-06-01 11:12:04 From: Thomas Kluyver Date: 2016-06-01 11:12:04 Subject: [PATCH] Don't update width of prompt area Fixes gh-9331 (roughly) The input prompts are now displayed through prompt_toolkit, so this code doesn't know the width it's trying to match. --- diff --git a/IPython/core/prompts.py b/IPython/core/prompts.py index 0f42557..bd1dd88 100644 --- a/IPython/core/prompts.py +++ b/IPython/core/prompts.py @@ -403,10 +403,10 @@ class PromptManager(Configurable): # Handle justification of prompt invis_chars = self.invisible_chars[name] if color else 0 - self.txtwidth = _lenlastline(res) - invis_chars + # self.txtwidth = _lenlastline(res) - invis_chars just = self.justify if (just is None) else just # If the prompt spans more than one line, don't try to justify it: if just and name != 'in' and ('\n' not in res) and ('\r' not in res): res = res.rjust(self.width + invis_chars) - self.width = _lenlastline(res) - invis_chars + # self.width = _lenlastline(res) - invis_chars return res