Show More
@@ -54,6 +54,14 b' class FrontendHighlighter(PygmentsHighlighter):' | |||
|
54 | 54 | |
|
55 | 55 | PygmentsHighlighter.highlightBlock(self, qstring) |
|
56 | 56 | |
|
57 | def rehighlightBlock(self, block): | |
|
58 | """ Reimplemented to temporarily enable highlighting if disabled. | |
|
59 | """ | |
|
60 | old = self.highlighting_on | |
|
61 | self.highlighting_on = True | |
|
62 | super(FrontendHighlighter, self).rehighlightBlock(block) | |
|
63 | self.highlighting_on = old | |
|
64 | ||
|
57 | 65 | def setFormat(self, start, count, format): |
|
58 | 66 | """ Reimplemented to highlight selectively. |
|
59 | 67 | """ |
@@ -155,12 +155,9 b' class IPythonWidget(FrontendWidget):' | |||
|
155 | 155 | self._prompt = self._insert_html_fetching_plain_text( |
|
156 | 156 | cursor, prompt) |
|
157 | 157 | |
|
158 |
# |
|
|
159 |
# |
|
|
160 | # determine how to preserve the existing formatting. | |
|
161 | self._highlighter.highlighting_on = True | |
|
158 | # When the HTML is inserted, Qt blows away the syntax | |
|
159 | # highlighting for the line, so we need to rehighlight it. | |
|
162 | 160 | self._highlighter.rehighlightBlock(cursor.block()) |
|
163 | self._highlighter.highlighting_on = False | |
|
164 | 161 | |
|
165 | 162 | self._previous_prompt_obj = None |
|
166 | 163 |
@@ -86,7 +86,7 b' class Kernel(Configurable):' | |||
|
86 | 86 | If true, an 'import *' is done from numpy and pylab. |
|
87 | 87 | """ |
|
88 | 88 | # FIXME: This is adapted from IPython.lib.pylabtools.pylab_activate. |
|
89 | # Common funtionality should be refactored. | |
|
89 | # Common functionality should be refactored. | |
|
90 | 90 | |
|
91 | 91 | # We must set the desired backend before importing pylab. |
|
92 | 92 | import matplotlib |
@@ -118,7 +118,6 b' class Kernel(Configurable):' | |||
|
118 | 118 | def start(self): |
|
119 | 119 | """ Start the kernel main loop. |
|
120 | 120 | """ |
|
121 | ||
|
122 | 121 | while True: |
|
123 | 122 | ident = self.reply_socket.recv() |
|
124 | 123 | assert self.reply_socket.rcvmore(), "Missing message part." |
General Comments 0
You need to be logged in to leave comments.
Login now