Show More
@@ -58,7 +58,7 b' class ConsoleWidget(Configurable, QtGui.QWidget):' | |||
|
58 | 58 | buffer_size = Int(500, config=True) |
|
59 | 59 | |
|
60 | 60 | # Whether to use a list widget or plain text output for tab completion. |
|
61 |
gui_completion = Bool( |
|
|
61 | gui_completion = Bool(False, config=True) | |
|
62 | 62 | |
|
63 | 63 | # The type of underlying text widget to use. Valid values are 'plain', which |
|
64 | 64 | # specifies a QPlainTextEdit, and 'rich', which specifies a QTextEdit. |
@@ -568,8 +568,7 b' class ConsoleWidget(Configurable, QtGui.QWidget):' | |||
|
568 | 568 | if self.gui_completion: |
|
569 | 569 | self._completion_widget.show_items(cursor, items) |
|
570 | 570 | else: |
|
571 |
|
|
|
572 | self._append_plain_text_keeping_prompt(text) | |
|
571 | self._page(self._format_as_columns(items)) | |
|
573 | 572 | |
|
574 | 573 | def _control_key_down(self, modifiers): |
|
575 | 574 | """ Given a KeyboardModifiers flags object, return whether the Control |
@@ -1160,9 +1159,7 b' class ConsoleWidget(Configurable, QtGui.QWidget):' | |||
|
1160 | 1159 | """ Displays text using the pager if it exceeds the height of the |
|
1161 | 1160 | visible area. |
|
1162 | 1161 | """ |
|
1163 |
if self.paging |
|
|
1164 | self._append_plain_text(text) | |
|
1165 | else: | |
|
1162 | if self.paging != 'none': | |
|
1166 | 1163 | line_height = QtGui.QFontMetrics(self.font).height() |
|
1167 | 1164 | minlines = self._control.viewport().height() / line_height |
|
1168 | 1165 | if re.match("(?:[^\n]*\n){%i}" % minlines, text): |
@@ -1180,8 +1177,11 b' class ConsoleWidget(Configurable, QtGui.QWidget):' | |||
|
1180 | 1177 | self._page_control.setFocus() |
|
1181 | 1178 | else: |
|
1182 | 1179 | self.layout().setCurrentWidget(self._page_control) |
|
1183 |
|
|
|
1184 | self._append_plain_text(text) | |
|
1180 | return | |
|
1181 | if self._executing: | |
|
1182 | self._append_plain_text(text) | |
|
1183 | else: | |
|
1184 | self._append_plain_text_keeping_prompt(text) | |
|
1185 | 1185 | |
|
1186 | 1186 | def _prompt_started(self): |
|
1187 | 1187 | """ Called immediately after a new prompt is displayed. |
@@ -51,8 +51,8 b' def main():' | |||
|
51 | 51 | help='set the paging style [default inside]') |
|
52 | 52 | wgroup.add_argument('--rich', action='store_true', |
|
53 | 53 | help='enable rich text support') |
|
54 |
wgroup.add_argument('-- |
|
|
55 |
help='do tab completion |
|
|
54 | wgroup.add_argument('--gui-completion', action='store_true', | |
|
55 | help='use a GUI widget for tab completion') | |
|
56 | 56 | |
|
57 | 57 | args = parser.parse_args() |
|
58 | 58 | |
@@ -89,7 +89,7 b' def main():' | |||
|
89 | 89 | widget = RichIPythonWidget(paging=args.paging) |
|
90 | 90 | else: |
|
91 | 91 | widget = IPythonWidget(paging=args.paging) |
|
92 |
widget.gui_completion = |
|
|
92 | widget.gui_completion = args.gui_completion | |
|
93 | 93 | widget.kernel_manager = kernel_manager |
|
94 | 94 | widget.setWindowTitle('Python' if args.pure else 'IPython') |
|
95 | 95 | widget.show() |
General Comments 0
You need to be logged in to leave comments.
Login now