about summary refs log tree commit diff stats
path: root/ranger
diff options
context:
space:
mode:
authortoonn <toonn@toonn.io>2021-01-16 20:55:21 +0100
committertoonn <toonn@toonn.io>2021-01-16 21:35:46 +0100
commit4ecb0fc04409848cd1385ce8932000e1c67a3dd1 (patch)
treec0e8b6c4e5c1244ef6017fbb3434d617400136f9 /ranger
parentdd41a90d63d9ad8268f231ad8bf6be9a24387aa9 (diff)
downloadranger-4ecb0fc04409848cd1385ce8932000e1c67a3dd1.tar.gz
transpose_subr: Remove check for equal regions
There's no point transposing equal regions, the result would be the
same.
Diffstat (limited to 'ranger')
-rw-r--r--ranger/gui/widgets/console.py3
1 files changed, 1 insertions, 2 deletions
diff --git a/ranger/gui/widgets/console.py b/ranger/gui/widgets/console.py
index 6c184395..816f341a 100644
--- a/ranger/gui/widgets/console.py
+++ b/ranger/gui/widgets/console.py
@@ -442,8 +442,7 @@ class Console(Widget):  # pylint: disable=too-many-instance-attributes,too-many-
     def transpose_subr(self, line, x, y):
         # Transpose substrings x & y of line
         # x & y are tuples of length two containing positions of endpoints
-        if not (0 <= x[0] <= x[1] <= y[0] <= y[1] <= len(line)
-                or 0<= x[0] == y[0] <= x[1] == y[1] <= len(line)):
+        if not (0 <= x[0] < x[1] <= y[0] < y[1] <= len(line)):
             self.fm.notify("Tried to transpose invalid regions.", bad=True)
             return line