##// END OF EJS Templates
Fixed bug where syntax highlighting was enabled during raw_input mode.
epatters -
Show More
@@ -116,18 +116,20 b' class FrontendWidget(HistoryConsoleWidget):'
116 def _prompt_started_hook(self):
116 def _prompt_started_hook(self):
117 """ Called immediately after a new prompt is displayed.
117 """ Called immediately after a new prompt is displayed.
118 """
118 """
119 self._highlighter.highlighting_on = True
119 if not self._reading:
120 self._highlighter.highlighting_on = True
120
121
121 # Auto-indent if this is a continuation prompt.
122 # Auto-indent if this is a continuation prompt.
122 if self._get_prompt_cursor().blockNumber() != \
123 if self._get_prompt_cursor().blockNumber() != \
123 self._get_end_cursor().blockNumber():
124 self._get_end_cursor().blockNumber():
124 self.appendPlainText(' ' * self._input_splitter.indent_spaces)
125 self.appendPlainText(' ' * self._input_splitter.indent_spaces)
125
126
126 def _prompt_finished_hook(self):
127 def _prompt_finished_hook(self):
127 """ Called immediately after a prompt is finished, i.e. when some input
128 """ Called immediately after a prompt is finished, i.e. when some input
128 will be processed and a new prompt displayed.
129 will be processed and a new prompt displayed.
129 """
130 """
130 self._highlighter.highlighting_on = False
131 if not self._reading:
132 self._highlighter.highlighting_on = False
131
133
132 def _tab_pressed(self):
134 def _tab_pressed(self):
133 """ Called when the tab key is pressed. Returns whether to continue
135 """ Called when the tab key is pressed. Returns whether to continue
General Comments 0
You need to be logged in to leave comments. Login now