##// END OF EJS Templates
Don't compute length of ZeroWidthTokens....
Matthias Bussonnier -
Show More
@@ -6,6 +6,8 b' import sys'
6
6
7 from IPython.core.displayhook import DisplayHook
7 from IPython.core.displayhook import DisplayHook
8
8
9 from prompt_toolkit.layout.utils import token_list_width
10
9 class Prompts(object):
11 class Prompts(object):
10 def __init__(self, shell):
12 def __init__(self, shell):
11 self.shell = shell
13 self.shell = shell
@@ -18,8 +20,7 b' class Prompts(object):'
18 ]
20 ]
19
21
20 def _width(self):
22 def _width(self):
21 in_tokens = self.in_prompt_tokens()
23 return token_list_width(self.in_prompt_tokens())
22 return sum(len(s) for (t, s) in in_tokens)
23
24
24 def continuation_prompt_tokens(self, cli=None, width=None):
25 def continuation_prompt_tokens(self, cli=None, width=None):
25 if width is None:
26 if width is None:
General Comments 0
You need to be logged in to leave comments. Login now