Weird line breaks mid sentence when using decho()

Post Reply
User avatar
satyr
Posts: 2
Joined: Sun Oct 13, 2024 11:10 pm
Discord: mordisko
Contact:

Weird line breaks mid sentence when using decho()

Post by satyr »

Hey there.

I'm having some weird issues where using decho() with colour codes might case word wrapping to break mid sentence.

With a 100 characters line break, this looks ok:

Code: Select all

lua decho("Text: a a a a a a a a a a a a a a a aa a a a a a a aa a a a a a a aa a a a a a a aa a a a a a a aa a a a a a a aa a a a a a a aa a a a a a a aa a a a a a a aa a a a a a a aa a a a a a a aa a a a a a a aa a a a a a a aa a a a a a a aa a a a a a a aa a a a a a a aa a a a a a a aa a a a a a a aa a a a a a a aa a a a a a a aa a a a a a a aa a a a a a a aa a a a a a a aa a a a a a a aa a a a a a a aa a a a a a a aa a a a a a a aa a a a a a a aa a a a a a a aa a a a a a a aa a a a a a a aa a a a a a a aa a a a a a a aa a a a a a a aa a a a a a a aa a a a a a a aa a a a a a a aa a a a a a a aa a a a a a a aa a a a a a a aa a a a a a a aa a a a a a a aa a a a a a a aa a a a a a a av")
But adding some formatting information there, breaks it:

Code: Select all

lua decho("Text: a a a a a a a a a a a a a a a aa a a a a a a aa a a a a <50,50,0:0,255,0>a a aa a a a a a a aa a a a a a a aa a a a a a a aa a a a a a a aa a a a a a a aa a a a a a a aa a a a a a a aa a a a a a a aa a a a a a a aa a a a a a a aa a a a a a a aa a a a a a a aa a a a a a a aa a a a a a a aa a a a a a a aa a a a a a a aa a a a a a a aa a a a a a a aa a a a a a a aa a a a a a a aa a a a a a a aa a a a a a a aa a a a a a a aa a a a a a a aa a a a a a a aa a a a a a a aa a a a a a a aa a a a a a a aa a a a a a a aa a a a a a a aa a a a a a a aa a a a a a a aa a a a a a a aa a a a a a a aa a a a a a a aa a a a a a a aa a a a a a a aa a a a a a a aa a a a a a a aa a a a a a a aa a a a a a a av")
You can see how both look like in the image attached. (note how the second decho breaks the text mid sentence).

Some details about my install:

Code: Select all

Technical information:
Version Mudlet 4.18.5
OS Ubuntu 22.04.5 LTS
CPU x86_64
Qt version 5.14.2
Is this expected behavior? if yes, how should I echo formatted text to a console so that the word-wrapping is respected?

Thanksall.
Attachments
Captura desde 2024-10-14 01-15-28.png

Post Reply