Wrap PAGER text, updated with PR review feedback

This commit is contained in:
jupart
2017-11-16 08:13:27 -05:00
parent a30fdbd1b3
commit 0f75b170d6

View File

@@ -552,7 +552,7 @@ class Terminal(object):
with self.suspend(): with self.suspend():
webbrowser.open_new_tab(url) webbrowser.open_new_tab(url)
def open_pager(self, data, wrap=False): def open_pager(self, data, wrap=None):
""" """
View a long block of text using the system's default pager. View a long block of text using the system's default pager.
@@ -564,10 +564,7 @@ class Terminal(object):
if wrap: if wrap:
data_lines = content.Content.wrap_text(data, wrap) data_lines = content.Content.wrap_text(data, wrap)
data = '' data = '\n'.join(data_lines)
for line in data_lines:
data += line + '\n'
try: try:
with self.suspend(): with self.suspend():