chiark / gitweb /
Space out the ... at the end of a boost/fave record.
authorSimon Tatham <anakin@pobox.com>
Thu, 7 Dec 2023 05:22:03 +0000 (05:22 +0000)
committerSimon Tatham <anakin@pobox.com>
Thu, 7 Dec 2023 05:22:03 +0000 (05:22 +0000)
text.py

diff --git a/text.py b/text.py
index dbaebe5715af379fad2cd6edd2aaec6f04d27006..7e1de02f1eec8047de522dedce3442cb09837036 100644 (file)
--- a/text.py
+++ b/text.py
@@ -328,7 +328,10 @@ class NotificationLog:
         except StopIteration:
             yield line
             return
-        line = next(line.split(width-3)) + ColouredString("...")
+        line = next(line.split(width-3))
+        if line.width < width-3:
+            line += ColouredString(" ")
+        line += ColouredString("...")
         yield line
 
 class HTMLParser(html.parser.HTMLParser):