##// END OF EJS Templates
%reset doesn't reset prompt number.
Thomas Kluyver -
Show More
@@ -164,15 +164,15 b' class HistoryManager(Configurable):'
164 164 def reset(self, new_session=True):
165 165 """Clear the session history, releasing all object references, and
166 166 optionally open a new session."""
167 if self.session_number:
168 self.end_session()
169 self.input_hist_parsed[:] = [""]
170 self.input_hist_raw[:] = [""]
171 167 self.output_hist.clear()
172 168 # The directory history can't be completely empty
173 169 self.dir_hist[:] = [os.getcwd()]
174 170
175 171 if new_session:
172 if self.session_number:
173 self.end_session()
174 self.input_hist_parsed[:] = [""]
175 self.input_hist_raw[:] = [""]
176 176 self.new_session()
177 177
178 178 ## -------------------------------
@@ -1045,13 +1045,13 b' class InteractiveShell(Configurable, Magic):'
1045 1045 """
1046 1046 # Clear histories
1047 1047 self.history_manager.reset(new_session)
1048 # Reset counter used to index all histories
1049 if new_session:
1050 self.execution_count = 1
1048 1051
1049 1052 # Flush cached output items
1050 1053 self.displayhook.flush()
1051 1054
1052 # Reset counter used to index all histories
1053 self.execution_count = 0
1054
1055 1055 # Restore the user namespaces to minimal usability
1056 1056 for ns in self.ns_refs_table:
1057 1057 ns.clear()
@@ -1007,7 +1007,7 b' Currently the magic system has the following functions:\\n"""'
1007 1007 del(user_ns[i])
1008 1008
1009 1009 else: # Hard reset
1010 self.shell.reset(new_session = True)
1010 self.shell.reset(new_session = False)
1011 1011
1012 1012
1013 1013
General Comments 0
You need to be logged in to leave comments. Login now