Skip to content

Conversation

@edent
Copy link

@edent edent commented Aug 28, 2025

Description

Messages had a hard-wrap which looked a bit shonky.

Let me know if this is grossly wrong.

Messages had a hard-wrap which looked a bit shonky.
@MatthewWilkes
Copy link
Member

I've just tried this, and it looks differently shonky, I'm afraid. It does add the newline, but causes a few alignment issues.

Looking at

def get_text_for_line(self, ctx, text, line):
width_for_line = 240
if line < (len(self.width_limits)):
width_for_line = self.width_limits[line]
extra_text = ""
text_that_fits = text
text_width = ctx.text_width(text_that_fits)
while text_width > width_for_line:
character = text_that_fits[-1]
text_that_fits = text_that_fits[:-1]
extra_text = character + extra_text
text_width = ctx.text_width(text_that_fits)
return text_that_fits, extra_text
it seems we don't consider newlines as part of the wrapping for the notification. I think that would need updating?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants