Show More
@@ -95,13 +95,21 class ConsoleWidget(LoggingConfigurable, QtGui.QWidget): | |||
|
95 | 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 | 106 | gui_completion = Enum(['plain', 'droplist', 'ncurses'], config=True, |
|
99 | 107 | default_value = 'ncurses', |
|
100 | 108 | help=""" |
|
101 | 109 | The type of completer to use. Valid values are: |
|
102 | 110 | |
|
103 |
'plain' : Show the avail |
|
|
104 |
Below the edit |
|
|
111 | 'plain' : Show the available completion as a text list | |
|
112 | Below the editing area. | |
|
105 | 113 | 'droplist': Show the completion in a drop down list navigable |
|
106 | 114 | by the arrow keys, and from which you can select |
|
107 | 115 | completion by pressing Return. |
@@ -615,9 +623,12 class ConsoleWidget(LoggingConfigurable, QtGui.QWidget): | |||
|
615 | 623 | self.input_buffer = source |
|
616 | 624 | |
|
617 | 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 | 630 | if hidden: |
|
620 | if complete: | |
|
631 | if complete or not self.execute_on_complete_input: | |
|
621 | 632 | self._execute(source, hidden) |
|
622 | 633 | else: |
|
623 | 634 | error = 'Incomplete noninteractive input: "%s"' |
General Comments 0
You need to be logged in to leave comments.
Login now