summary refs log tree commit diff stats
diff options
context:
space:
mode:
authorhut <hut@lavabit.com>2010-12-21 23:26:06 +0100
committerhut <hut@lavabit.com>2010-12-21 23:26:22 +0100
commitd7fa37ed92be945f33cc071522d6c88712e04d92 (patch)
treeffe94472e8d9d16ff66d0a053eb0ec063c8875d3
parent50a676b48ea40f7dd39e92cbce0b354bbc663f00 (diff)
downloadranger-d7fa37ed92be945f33cc071522d6c88712e04d92.tar.gz
widgets.pager: Fixed horizontal scrolling
-rw-r--r--ranger/gui/widgets/pager.py2
1 files changed, 2 insertions, 0 deletions
diff --git a/ranger/gui/widgets/pager.py b/ranger/gui/widgets/pager.py
index bff30c55..64444064 100644
--- a/ranger/gui/widgets/pager.py
+++ b/ranger/gui/widgets/pager.py
@@ -170,9 +170,11 @@ class Pager(Widget):
 		if isinstance(source, str):
 			self.source_is_stream = False
 			self.lines = source.splitlines()
+			self.max_width = max(len(line) for line in self.lines)
 		elif hasattr(source, '__getitem__'):
 			self.source_is_stream = False
 			self.lines = source
+			self.max_width = max(len(line) for line in source)
 		elif hasattr(source, 'readline'):
 			self.source_is_stream = True
 			self.lines = []
3' href='#n123'>123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177