summary refs log tree commit diff stats
path: root/ranger
diff options
context:
space:
mode:
authorhut <hut@lepus.uberspace.de>2013-08-17 13:49:31 +0200
committerhut <hut@lepus.uberspace.de>2013-08-17 13:49:31 +0200
commit8a098da9f1e1fa62ddb6f629e50526686d3c1bbb (patch)
tree503361c3016b95ce3bf521e20221b6e0aa420340 /ranger
parent104ccf94dfe324285c2f60faad26fda66d43a30a (diff)
downloadranger-8a098da9f1e1fa62ddb6f629e50526686d3c1bbb.tar.gz
ext.direction: fix off-by-one error in select()
Diffstat (limited to 'ranger')
-rw-r--r--ranger/ext/direction.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/ranger/ext/direction.py b/ranger/ext/direction.py
index afb27aa3..d6b465cd 100644
--- a/ranger/ext/direction.py
+++ b/ranger/ext/direction.py
@@ -130,7 +130,7 @@ class Direction(dict):
 
     def select(self, lst, current, pagesize, override=None, offset=1):
         dest = self.move(direction=self.down(), override=override,
-            current=current, pagesize=pagesize, minimum=0, maximum=len(lst))
+            current=current, pagesize=pagesize, minimum=0, maximum=len(lst)+1)
         selection = lst[min(current, dest):max(current, dest) + offset]
         return dest + offset - 1, selection