From 2df8115223ebcd04403a17a067d543d5c097c701 Mon Sep 17 00:00:00 2001 From: nfnty Date: Mon, 6 Feb 2017 19:43:43 +0100 Subject: core.actions.Actions.move: visual: Change order of if statements --- ranger/core/actions.py | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/ranger/core/actions.py b/ranger/core/actions.py index ab549b37..8bb66a62 100644 --- a/ranger/core/actions.py +++ b/ranger/core/actions.py @@ -497,16 +497,16 @@ class Actions( # pylint: disable=too-many-instance-attributes,too-many-public-m targets = set(cwd.files[min(pos_start, pos_new):(max(pos_start, pos_new) + 1)]) # Cycled down once elif self._visual_move_cycles == 1: - if pos_new >= pos_start: - targets = set(cwd.files) - else: + if pos_new < pos_start: targets = set(cwd.files[:(pos_new + 1)] + cwd.files[pos_start:]) + else: + targets = set(cwd.files) # Cycled up once elif self._visual_move_cycles == -1: - if pos_new <= pos_start: - targets = set(cwd.files) - else: + if pos_new > pos_start: targets = set(cwd.files[:(pos_start + 1)] + cwd.files[pos_new:]) + else: + targets = set(cwd.files) # Cycled more than once else: targets = set(cwd.files) -- cgit 1.4.1-2-gfad0