##// END OF EJS Templates
Merge pull request #10489 from takluyver/i10425...
meeseeksdev[bot] -
r23582:bbb0bc29 merge
parent child Browse files
Show More
@@ -113,8 +113,13 b' def newline_or_execute_outer(shell):'
113 b.cancel_completion()
113 b.cancel_completion()
114 return
114 return
115
115
116 before_text = d.text[:d.cursor_position]
116 # If there's only one line, treat it as if the cursor is at the end.
117 status, indent = shell.input_splitter.check_complete(before_text + '\n')
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 if not (d.on_last_line or
124 if not (d.on_last_line or
120 d.cursor_position_row >= d.line_count - d.empty_line_count_at_the_end()
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