##// END OF EJS Templates
Merge pull request #3814 from minrk/no-complete...
Min RK -
r11819:e45a7743 merge
parent child Browse files
Show More
@@ -95,13 +95,21 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 execute_on_complete_input = Bool(True, config=True,
99 help="""Whether to automatically execute on syntactically complete input.
100
101 If False, Shift-Enter is required to submit each execution.
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 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.execute_on_complete_input:
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.execute_on_complete_input:
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