diff options
author | toonn <toonn@toonn.io> | 2021-07-16 14:56:19 +0200 |
---|---|---|
committer | toonn <toonn@toonn.io> | 2021-07-20 23:17:45 +0200 |
commit | 48ac075160ed425a35b74743612ab6b5916e9a04 (patch) | |
tree | 7cee7dfbd0b69f81d3e925177836345fdc9969ab | |
parent | 43584fb3633f1db89ca4857d7a8dd568172ff26f (diff) | |
download | ranger-48ac075160ed425a35b74743612ab6b5916e9a04.tar.gz |
ext.accumulator: Use max rather than branch
-rw-r--r-- | ranger/ext/accumulator.py | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/ranger/ext/accumulator.py b/ranger/ext/accumulator.py index c2e33b59..a41db634 100644 --- a/ranger/ext/accumulator.py +++ b/ranger/ext/accumulator.py @@ -75,8 +75,7 @@ class Accumulator(object): i = 0 if i >= len(lst): i = len(lst) - 1 - if i < 0: - i = 0 + i = max(0, i) self.pointer = i self.pointed_obj = lst[i] |