##// END OF EJS Templates
Merge pull request #10501 from ipython/auto-backport-of-pr-10489...
Thomas Kluyver -
r23585:acece232 merge
parent child Browse files
Show More
@@ -96,8 +96,13 b' def newline_or_execute_outer(shell):'
96 b.cancel_completion()
96 b.cancel_completion()
97 return
97 return
98
98
99 before_text = d.text[:d.cursor_position]
99 # If there's only one line, treat it as if the cursor is at the end.
100 status, indent = shell.input_splitter.check_complete(before_text + '\n')
100 # See https://github.com/ipython/ipython/issues/10425
101 if d.line_count == 1:
102 check_text = d.text
103 else:
104 check_text = d.text[:d.cursor_position]
105 status, indent = shell.input_splitter.check_complete(check_text + '\n')
101
106
102 if not (d.on_last_line or
107 if not (d.on_last_line or
103 d.cursor_position_row >= d.line_count - d.empty_line_count_at_the_end()
108 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