summary refs log tree commit diff stats
path: root/ranger
diff options
context:
space:
mode:
authornfnty <git@nfnty.se>2017-02-06 19:43:43 +0100
committernfnty <git@nfnty.se>2017-02-06 19:43:43 +0100
commit2df8115223ebcd04403a17a067d543d5c097c701 (patch)
treec42b9e6ecb0453a88bc49af792129091444f5e19 /ranger
parent5b1023d5db2952311eb97a381ff3f854f515f57c (diff)
downloadranger-2df8115223ebcd04403a17a067d543d5c097c701.tar.gz
core.actions.Actions.move: visual: Change order of if statements
Diffstat (limited to 'ranger')
-rw-r--r--ranger/core/actions.py12
1 files 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)