Show More
@@ -100,12 +100,14 b' def newline_or_execute_outer(shell):' | |||||
100 | b.cancel_completion() |
|
100 | b.cancel_completion() | |
101 | return |
|
101 | return | |
102 |
|
102 | |||
103 | if not (d.on_last_line or d.cursor_position_row >= d.line_count |
|
103 | before_text = d.text[:d.cursor_position] | |
104 | - d.empty_line_count_at_the_end()): |
|
104 | status, indent = shell.input_splitter.check_complete(before_text + '\n') | |
105 | b.newline() |
|
|||
106 | return |
|
|||
107 |
|
105 | |||
108 | status, indent = shell.input_splitter.check_complete(d.text + '\n') |
|
106 | if not (d.on_last_line or | |
|
107 | d.cursor_position_row >= d.line_count - d.empty_line_count_at_the_end() | |||
|
108 | ): | |||
|
109 | b.insert_text('\n' + (' ' * (indent or 0))) | |||
|
110 | return | |||
109 |
|
111 | |||
110 | if (status != 'incomplete') and b.accept_action.is_returnable: |
|
112 | if (status != 'incomplete') and b.accept_action.is_returnable: | |
111 | b.accept_action.validate_and_handle(event.cli, b) |
|
113 | b.accept_action.validate_and_handle(event.cli, b) |
General Comments 0
You need to be logged in to leave comments.
Login now