##// END OF EJS Templates
add `ConsoleWidget.check_complete` flag...
MinRK -
Show More
@@ -95,13 +95,21 b' class ConsoleWidget(LoggingConfigurable, QtGui.QWidget):'
95 non-positive number disables text truncation (not recommended).
95 non-positive number disables text truncation (not recommended).
96 """
96 """
97 )
97 )
98 check_complete = Bool(True, config=True,
99 help="""Whether to check completion and attempt to automatically execute
100 on complete input.
101 If False, Shift-Enter is required to execute each input.
102 Disabling this is mainly useful for non-Python kernels,
103 where the completion check would be wrong.
104 """
105 )
98 gui_completion = Enum(['plain', 'droplist', 'ncurses'], config=True,
106 gui_completion = Enum(['plain', 'droplist', 'ncurses'], config=True,
99 default_value = 'ncurses',
107 default_value = 'ncurses',
100 help="""
108 help="""
101 The type of completer to use. Valid values are:
109 The type of completer to use. Valid values are:
102
110
103 'plain' : Show the availlable completion as a text list
111 'plain' : Show the available completion as a text list
104 Below the editting area.
112 Below the editing area.
105 'droplist': Show the completion in a drop down list navigable
113 'droplist': Show the completion in a drop down list navigable
106 by the arrow keys, and from which you can select
114 by the arrow keys, and from which you can select
107 completion by pressing Return.
115 completion by pressing Return.
@@ -615,9 +623,12 b' class ConsoleWidget(LoggingConfigurable, QtGui.QWidget):'
615 self.input_buffer = source
623 self.input_buffer = source
616
624
617 # Execute the source or show a continuation prompt if it is incomplete.
625 # Execute the source or show a continuation prompt if it is incomplete.
618 complete = self._is_complete(source, interactive)
626 if self.check_complete:
627 complete = self._is_complete(source, interactive)
628 else:
629 complete = not interactive
619 if hidden:
630 if hidden:
620 if complete:
631 if complete or not self.check_complete:
621 self._execute(source, hidden)
632 self._execute(source, hidden)
622 else:
633 else:
623 error = 'Incomplete noninteractive input: "%s"'
634 error = 'Incomplete noninteractive input: "%s"'
General Comments 0
You need to be logged in to leave comments. Login now