Fix error in more edge calculation when using client with SCREENWIDTH=0. Resolves #1257.

This commit is contained in:
Griatch 2017-03-27 22:40:40 +02:00
parent 6f30ab09f5
commit 21e72e416c

View file

@ -181,7 +181,7 @@ class EvMore(object):
lines.append(line)
# always limit number of chars to 10 000 per page
height = min(10000 // width, height)
height = min(10000 // max(1, width), height)
self._pages = ["\n".join(lines[i:i+height]) for i in range(0, len(lines), height)]
self._npages = len(self._pages)