From cc1809db3173bec467c2a0fe80a39655c8f139b2 Mon Sep 17 00:00:00 2001 From: Ivan Habunek Date: Thu, 2 Feb 2023 09:31:37 +0100 Subject: [PATCH] Remove splitlines, not needed Works just as well if provided as a single Text object. --- toot/tui/overlays.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/toot/tui/overlays.py b/toot/tui/overlays.py index bef37da..33b1d8b 100644 --- a/toot/tui/overlays.py +++ b/toot/tui/overlays.py @@ -13,9 +13,8 @@ class StatusSource(urwid.Padding): """Shows status data, as returned by the server, as formatted JSON.""" def __init__(self, status): self.source = json.dumps(status.data, indent=4) - lines = self.source.splitlines() walker = urwid.SimpleFocusListWalker([ - urwid.Text(line) for line in lines + urwid.Text(self.source) ]) list = urwid.ListBox(walker)