##// END OF EJS Templates
Add continuation prompts
Thomas Kluyver -
Show More
@@ -65,6 +65,11 b' class PTInteractiveShell(InteractiveShell):'
65 (Token.Prompt, ']: '),
65 (Token.Prompt, ']: '),
66 ]
66 ]
67
67
68 def get_continuation_tokens(self, cli, width):
69 return [
70 (Token.Prompt, (' ' * (width - 2)) + ': '),
71 ]
72
68
73
69 def init_prompt_toolkit_cli(self):
74 def init_prompt_toolkit_cli(self):
70 kbmanager = KeyBindingManager.for_prompt(enable_vi_mode=self.vi_mode)
75 kbmanager = KeyBindingManager.for_prompt(enable_vi_mode=self.vi_mode)
@@ -122,6 +127,7 b' class PTInteractiveShell(InteractiveShell):'
122 app = create_prompt_application(multiline=True,
127 app = create_prompt_application(multiline=True,
123 lexer=PygmentsLexer(Python3Lexer if PY3 else PythonLexer),
128 lexer=PygmentsLexer(Python3Lexer if PY3 else PythonLexer),
124 get_prompt_tokens=self.get_prompt_tokens,
129 get_prompt_tokens=self.get_prompt_tokens,
130 get_continuation_tokens=self.get_continuation_tokens,
125 key_bindings_registry=kbmanager.registry,
131 key_bindings_registry=kbmanager.registry,
126 history=history,
132 history=history,
127 completer=IPythonPTCompleter(self.Completer),
133 completer=IPythonPTCompleter(self.Completer),
General Comments 0
You need to be logged in to leave comments. Login now