summary refs log tree commit diff stats
path: root/ranger
diff options
context:
space:
mode:
authorhut <hut@lavabit.com>2011-10-05 13:24:13 +0200
committerhut <hut@lavabit.com>2011-10-05 13:25:18 +0200
commitf5a50c93ba163b7014bb0dd8f5635c1b9257a629 (patch)
tree365fc0e98ac9045dd97d1cb558383b54fdefd737 /ranger
parent0378a2cce3b36bab272e365dcf4c5c9228f44938 (diff)
downloadranger-f5a50c93ba163b7014bb0dd8f5635c1b9257a629.tar.gz
widgets.console: fixed crash when typing special keys
Diffstat (limited to 'ranger')
-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):