Wrap PAGER text, updated with PR review feedback
This commit is contained in:
@@ -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():
|
||||||
|
|||||||
Reference in New Issue
Block a user