diff --git a/IPython/core/history.py b/IPython/core/history.py index a5e8c59..9bcdc03 100644 --- a/IPython/core/history.py +++ b/IPython/core/history.py @@ -285,6 +285,8 @@ class HistoryManager(object): self.output_hist.clear() # The directory history can't be completely empty self.dir_hist[:] = [os.getcwd()] + # Reset session offset to -1, so next command counts as #1 + self.session_offset = -1 class HistorySaveThread(threading.Thread): """This thread makes IPython save history periodically.