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
id='n141' href='#n141'>141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205