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)
bit.com> 2009-12-12 03:08:36 +0100 committer hut <hut@lavabit.com> 2009-12-12 03:08:36 +0100 updated UML project' href='/akspecs/ranger/commit/uml/134530.diagram?h=v1.4.4&id=61de0a4defd3fe275f6f51fe81f362b0adbdf382'>61de0a4d ^
cfbb8c84 ^
61de0a4d ^
cfbb8c84 ^
61de0a4d ^
cfbb8c84 ^
61de0a4d ^
cfbb8c84 ^
61de0a4d ^
cfbb8c84 ^
61de0a4d ^
cfbb8c84 ^
61de0a4d ^
cfbb8c84 ^
61de0a4d ^
cfbb8c84 ^
61de0a4d ^
cfbb8c84 ^
61de0a4d ^
cfbb8c84 ^
61de0a4d ^
cfbb8c84 ^
61de0a4d ^


cfbb8c84 ^
61de0a4d ^
cfbb8c84 ^
61de0a4d ^
cfbb8c84 ^
61de0a4d ^
cfbb8c84 ^
61de0a4d ^
cfbb8c84 ^
61de0a4d ^
cfbb8c84 ^
61de0a4d ^
9f186528 ^
61de0a4d ^
9f186528 ^
61de0a4d ^
9f186528 ^
8db3c4b1 ^
9f186528 ^
6f43de0a ^
9f186528 ^
61de0a4d ^
9f186528 ^
61de0a4d ^
9f186528 ^
61de0a4d ^
9f186528 ^
61de0a4d ^
9f186528 ^
61de0a4d ^


cfbb8c84 ^
61de0a4d ^

69a0e827 ^



61de0a4d ^


cfbb8c84 ^


61de0a4d ^

cfbb8c84 ^


61de0a4d ^



cfbb8c84 ^


61de0a4d ^



cfbb8c84 ^


61de0a4d ^

cfbb8c84 ^


61de0a4d ^


cfbb8c84 ^


61de0a4d ^


cfbb8c84 ^


61de0a4d ^


cfbb8c84 ^


61de0a4d ^

cfbb8c84 ^


61de0a4d ^

cfbb8c84 ^


61de0a4d ^



cfbb8c84 ^


61de0a4d ^



9f186528 ^


61de0a4d ^

9f186528 ^


61de0a4d ^

9f186528 ^


61de0a4d ^


9f186528 ^


61de0a4d ^

9f186528 ^


61de0a4d ^

9f186528 ^


61de0a4d ^
6f43de0a ^
9f186528 ^


69a0e827 ^









cfbb8c84 ^
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190