summary refs log tree commit diff stats
path: root/ranger
diff options
context:
space:
mode:
authorLaurent Charignon <l.charignon@gmail.com>2016-01-31 17:58:42 -0800
committerLaurent Charignon <l.charignon@gmail.com>2016-01-31 17:59:13 -0800
commitf54fe5ac282254f6ecd6de70d21b20889fae5b43 (patch)
treedf1922e666632e41eac548554e3972a5d395a1cc /ranger
parenta559816d67f5f6e3b9a26566798000d8e848feee (diff)
downloadranger-f54fe5ac282254f6ecd6de70d21b20889fae5b43.tar.gz
history: fix logic error and add test for all the methods
Diffstat (limited to 'ranger')
-rw-r--r--ranger/container/history.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/ranger/container/history.py b/ranger/container/history.py
index 387fd1bf..db2ea8ab 100644
--- a/ranger/container/history.py
+++ b/ranger/container/history.py
@@ -55,7 +55,7 @@ class History(object):
     def rebase(self, other_history):
         assert isinstance(other_history, History)
         index_offset = len(self._history) - self._index
-        self._history[:self._index] = list(other_history._history)
+        self._history[:self._index + 1] = list(other_history._history)
         if len(self._history) > self.maxlen:
             self._history = self._history[-self.maxlen:]
         self._index = len(self._history) - index_offset