diff options
author | Laurent Charignon <l.charignon@gmail.com> | 2016-01-31 17:58:42 -0800 |
---|---|---|
committer | Laurent Charignon <l.charignon@gmail.com> | 2016-01-31 17:59:13 -0800 |
commit | f54fe5ac282254f6ecd6de70d21b20889fae5b43 (patch) | |
tree | df1922e666632e41eac548554e3972a5d395a1cc /ranger | |
parent | a559816d67f5f6e3b9a26566798000d8e848feee (diff) | |
download | ranger-f54fe5ac282254f6ecd6de70d21b20889fae5b43.tar.gz |
history: fix logic error and add test for all the methods
Diffstat (limited to 'ranger')
-rw-r--r-- | ranger/container/history.py | 2 |
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 |