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 127bd7ad..d9141df8 100644
--- a/ranger/gui/widgets/console.py
+++ b/ranger/gui/widgets/console.py
@@ -164,7 +164,9 @@ class Console(Widget):
 			try:
 				decoded = self.unicode_buffer.encode("latin-1").decode("utf-8")
 			except UnicodeDecodeError:
-				pass
+				return
+			except UnicodeEncodeError:
+				return
 			else:
 				self.unicode_buffer = ""
 				if self.pos == len(self.line):