Show More
@@ -113,8 +113,13 b' def newline_or_execute_outer(shell):' | |||
|
113 | 113 | b.cancel_completion() |
|
114 | 114 | return |
|
115 | 115 | |
|
116 | before_text = d.text[:d.cursor_position] | |
|
117 | status, indent = shell.input_splitter.check_complete(before_text + '\n') | |
|
116 | # If there's only one line, treat it as if the cursor is at the end. | |
|
117 | # See https://github.com/ipython/ipython/issues/10425 | |
|
118 | if d.line_count == 1: | |
|
119 | check_text = d.text | |
|
120 | else: | |
|
121 | check_text = d.text[:d.cursor_position] | |
|
122 | status, indent = shell.input_splitter.check_complete(check_text + '\n') | |
|
118 | 123 | |
|
119 | 124 | if not (d.on_last_line or |
|
120 | 125 | d.cursor_position_row >= d.line_count - d.empty_line_count_at_the_end() |
General Comments 0
You need to be logged in to leave comments.
Login now