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 = []
'#n68'>68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 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