diff --git a/IPython/frontend/qt/console/console_widget.py b/IPython/frontend/qt/console/console_widget.py index b1983a3..a9345ab 100644 --- a/IPython/frontend/qt/console/console_widget.py +++ b/IPython/frontend/qt/console/console_widget.py @@ -58,7 +58,7 @@ class ConsoleWidget(Configurable, QtGui.QWidget): buffer_size = Int(500, config=True) # Whether to use a list widget or plain text output for tab completion. - gui_completion = Bool(True, config=True) + gui_completion = Bool(False, config=True) # The type of underlying text widget to use. Valid values are 'plain', which # specifies a QPlainTextEdit, and 'rich', which specifies a QTextEdit. @@ -568,8 +568,7 @@ class ConsoleWidget(Configurable, QtGui.QWidget): if self.gui_completion: self._completion_widget.show_items(cursor, items) else: - text = self._format_as_columns(items) - self._append_plain_text_keeping_prompt(text) + self._page(self._format_as_columns(items)) def _control_key_down(self, modifiers): """ Given a KeyboardModifiers flags object, return whether the Control @@ -1160,9 +1159,7 @@ class ConsoleWidget(Configurable, QtGui.QWidget): """ Displays text using the pager if it exceeds the height of the visible area. """ - if self.paging == 'none': - self._append_plain_text(text) - else: + if self.paging != 'none': line_height = QtGui.QFontMetrics(self.font).height() minlines = self._control.viewport().height() / line_height if re.match("(?:[^\n]*\n){%i}" % minlines, text): @@ -1180,8 +1177,11 @@ class ConsoleWidget(Configurable, QtGui.QWidget): self._page_control.setFocus() else: self.layout().setCurrentWidget(self._page_control) - else: - self._append_plain_text(text) + return + if self._executing: + self._append_plain_text(text) + else: + self._append_plain_text_keeping_prompt(text) def _prompt_started(self): """ Called immediately after a new prompt is displayed. diff --git a/IPython/frontend/qt/console/scripts/ipythonqt.py b/IPython/frontend/qt/console/scripts/ipythonqt.py index 4229a77..5b9ccdc 100755 --- a/IPython/frontend/qt/console/scripts/ipythonqt.py +++ b/IPython/frontend/qt/console/scripts/ipythonqt.py @@ -51,8 +51,8 @@ def main(): help='set the paging style [default inside]') wgroup.add_argument('--rich', action='store_true', help='enable rich text support') - wgroup.add_argument('--tab-simple', action='store_true', - help='do tab completion ala a Unix terminal') + wgroup.add_argument('--gui-completion', action='store_true', + help='use a GUI widget for tab completion') args = parser.parse_args() @@ -89,7 +89,7 @@ def main(): widget = RichIPythonWidget(paging=args.paging) else: widget = IPythonWidget(paging=args.paging) - widget.gui_completion = not args.tab_simple + widget.gui_completion = args.gui_completion widget.kernel_manager = kernel_manager widget.setWindowTitle('Python' if args.pure else 'IPython') widget.show()