diff options
author | hut <hut@lepus.uberspace.de> | 2013-08-17 13:49:31 +0200 |
---|---|---|
committer | hut <hut@lepus.uberspace.de> | 2013-08-17 13:49:31 +0200 |
commit | 8a098da9f1e1fa62ddb6f629e50526686d3c1bbb (patch) | |
tree | 503361c3016b95ce3bf521e20221b6e0aa420340 | |
parent | 104ccf94dfe324285c2f60faad26fda66d43a30a (diff) | |
download | ranger-8a098da9f1e1fa62ddb6f629e50526686d3c1bbb.tar.gz |
ext.direction: fix off-by-one error in select()
-rw-r--r-- | ranger/ext/direction.py | 2 |
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 |