Page 1 of 1

all message show output don't follow the wrap rule

Posted: Thu Apr 23, 2020 2:29 pm
by zhenzh
I find the output of all message show commands(print,echo,display and etc.) will not be restrained by ling wrap so that messages get out of the window size.

Re: all message show output don't follow the wrap rule

Posted: Thu Apr 23, 2020 3:07 pm
by zhenzh
Besides, the line wrap counter doesn't unify the length of different characters.
Both single and double bytes characters are treated as the same length which get the english and non-english lines wrap at different position. I understand such method simply avoides double byte characters being separated into half, but it do not be a good choice for wrap processing.
In my playing chinese mud, there're english/chinese messages mixed. Smaller wrap number may get the english line wrap earlier while bigger wrap number may get the chinese out of the window size.

Another problem is the wrap position choice for single/double bytes character mixed lines. For general english words, space is the best choice for ling wrapping as it avoides the whold word being divided. While such case doesn't meet the requirement for mixed lines as space will not be the only separator(use chinese as an example, each two chinese word can be separated without space existing)
abc abc abc 口口口口口口口口口口口口口口口口口口 abc abc abc 口口口口口口口口口口口口口口口口口口口口口
The best separate for such line will be:
abc abc abc 口口口口口口口口口口口口口口
口口口口 abc abc abc 口口口口口口口口口
口口口口口口口口口口口口
while space based separate will get the line looks like:
abc abc abc
口口口口口口口口口口口口口口口口口口
abc abc abc
口口口口口口口口口口口口口口口口口口口口口
A strange show which get single bytes and double bytes divided into different lines

Re: all message show output don't follow the wrap rule

Posted: Thu Apr 23, 2020 7:18 pm
by Vadi
Hi!

Yes, that is an issue - it is natively looking for a space right now (or some other characters). Could you file this on https://github.com/Mudlet/Mudlet/issues/new ?

We'd need to use QTextBoundaryFinder here as @SlySven mentions to get it right.

Re: all message show output don't follow the wrap rule

Posted: Fri Apr 24, 2020 2:30 am
by zhenzh
I have opened 3 issues for tracking show command wrapping, unify the length of character, wrapping position choice for non-english character