From d8fd8d0d56725747be84ee5ffe7494123602e34f Mon Sep 17 00:00:00 2001 From: Ivan Habunek Date: Sat, 13 Jan 2018 23:06:24 +0100 Subject: [PATCH] Wrap URLs if needed --- toot/ui/app.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/toot/ui/app.py b/toot/ui/app.py index 40f67c1..bb69dde 100644 --- a/toot/ui/app.py +++ b/toot/ui/app.py @@ -191,8 +191,11 @@ class StatusDetailWindow: yield line def footer_lines(self, status): + text_width = self.width - 4 + if status['url'] is not None: - yield status['url'] + for line in wrap(status['url'], text_width): + yield line if status['boosted_by']: acct = status['boosted_by']['acct']