about summary refs log tree commit diff stats
diff options
context:
space:
mode:
-rw-r--r--ranger/gui/widgets/console.py4
1 files changed, 3 insertions, 1 deletions
diff --git a/ranger/gui/widgets/console.py b/ranger/gui/widgets/console.py
index 2ff1943d..876081f8 100644
--- a/ranger/gui/widgets/console.py
+++ b/ranger/gui/widgets/console.py
@@ -456,7 +456,9 @@ class Console(Widget):  # pylint: disable=too-many-instance-attributes,too-many-
         return line
 
     def transpose_chars(self):
-        if self.pos == len(self.line):
+        if self.pos == 0:
+            return
+        elif self.pos == len(self.line):
             x = max(0, self.pos - 2), max(0, self.pos - 1)
             y = max(0, self.pos - 1), self.pos
         else: