about summary refs log tree commit diff stats
diff options
context:
space:
mode:
authortoonn <toonn@toonn.io>2021-07-17 23:10:49 +0200
committertoonn <toonn@toonn.io>2021-07-20 23:17:45 +0200
commit0678f5f0f7163ee1f099b5ff657d58d533b5fd9c (patch)
treeb14b4a2b3c2a595e82405ba5a797efbac6b7c11d
parent6db53d9a8a6c9d30b63330bd9edb2f749c8c02f7 (diff)
downloadranger-0678f5f0f7163ee1f099b5ff657d58d533b5fd9c.tar.gz
container.history: Fix type error due to forgotten len
-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 d271176d..93a5b1fe 100644
--- a/ranger/container/history.py
+++ b/ranger/container/history.py
@@ -112,7 +112,7 @@ class History(object):
         return self.current()
 
     def move(self, n):
-        self.index = max(0, min(self.history - 1, self.index + n))
+        self.index = max(0, min(len(self.history) - 1, self.index + n))
         return self.current()
 
     def search(self, string, n):