##// END OF EJS Templates
don't save empty lines in history
Julian Taylor -
Show More
@@ -231,7 +231,7 b' class TerminalInteractiveShell(InteractiveShell):'
231
231
232 def _replace_rlhist_multiline(self, source_raw):
232 def _replace_rlhist_multiline(self, source_raw):
233 """Store multiple lines as a single entry in history"""
233 """Store multiple lines as a single entry in history"""
234 if self.multiline_history and self.has_readline:
234 if self.multiline_history and self.has_readline and source_raw.rstrip():
235 hlen = self.readline.get_current_history_length()
235 hlen = self.readline.get_current_history_length()
236 for i in range(hlen - self.hlen_before_cell):
236 for i in range(hlen - self.hlen_before_cell):
237 self.readline.remove_history_item(hlen - i - 1)
237 self.readline.remove_history_item(hlen - i - 1)
General Comments 0
You need to be logged in to leave comments. Login now