From d7fa37ed92be945f33cc071522d6c88712e04d92 Mon Sep 17 00:00:00 2001 From: hut Date: Tue, 21 Dec 2010 23:26:06 +0100 Subject: widgets.pager: Fixed horizontal scrolling --- ranger/gui/widgets/pager.py | 2 ++ 1 file changed, 2 insertions(+) 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 = [] -- cgit 1.4.1-2-gfad0