about summary refs log tree commit diff stats
diff options
context:
space:
mode:
-rw-r--r--ranger/gui/widgets/console.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/ranger/gui/widgets/console.py b/ranger/gui/widgets/console.py
index a6d9117c..6c184395 100644
--- a/ranger/gui/widgets/console.py
+++ b/ranger/gui/widgets/console.py
@@ -442,8 +442,8 @@ 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 (x[0] <= x[1] <= y[0] <= y[1] <= len(line)
-                or x[0] == y[0] <= x[1] == y[1] <= len(line)):
+        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)):
             self.fm.notify("Tried to transpose invalid regions.", bad=True)
             return line