about summary refs log tree commit diff stats
diff options
context:
space:
mode:
-rw-r--r--ranger/gui/widgets/pager.py11
1 files changed, 7 insertions, 4 deletions
diff --git a/ranger/gui/widgets/pager.py b/ranger/gui/widgets/pager.py
index d69d580e..0e13ecbd 100644
--- a/ranger/gui/widgets/pager.py
+++ b/ranger/gui/widgets/pager.py
@@ -147,10 +147,13 @@ class Pager(Widget):
 			return self.lines[n]
 		except (KeyError, IndexError):
 			if attempt_to_read and self.source_is_stream:
-				for l in self.source:
-					self.lines.append(l)
-					if len(self.lines) > n:
-						break
+				try:
+					for l in self.source:
+						self.lines.append(l)
+						if len(self.lines) > n:
+							break
+				except UnicodeError:
+					pass
 				return self._get_line(n, attempt_to_read=False)
 			return ""