##// END OF EJS Templates
Make behaviour more natural with blank lines at the end of input
Thomas Kluyver -
Show More
@@ -89,11 +89,13 b' class PTInteractiveShell(InteractiveShell):'
89 ))
89 ))
90 def _(event):
90 def _(event):
91 b = event.current_buffer
91 b = event.current_buffer
92 if not b.document.on_last_line:
92 d = b.document
93 if not (d.on_last_line or d.cursor_position_row >= d.line_count
94 - d.empty_line_count_at_the_end()):
93 b.newline()
95 b.newline()
94 return
96 return
95
97
96 status, indent = self.input_splitter.check_complete(b.document.text)
98 status, indent = self.input_splitter.check_complete(d.text)
97
99
98 if (status != 'incomplete') and b.accept_action.is_returnable:
100 if (status != 'incomplete') and b.accept_action.is_returnable:
99 b.accept_action.validate_and_handle(event.cli, b)
101 b.accept_action.validate_and_handle(event.cli, b)
General Comments 0
You need to be logged in to leave comments. Login now