all message show output don't follow the wrap rule

Post Reply
zhenzh
Posts: 68
Joined: Fri Apr 17, 2020 2:23 am

all message show output don't follow the wrap rule

Post 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.

zhenzh
Posts: 68
Joined: Fri Apr 17, 2020 2:23 am

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

Post 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

User avatar
Vadi
Posts: 5035
Joined: Sat Mar 14, 2009 3:13 pm

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

Post 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.

zhenzh
Posts: 68
Joined: Fri Apr 17, 2020 2:23 am

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

Post by zhenzh »

I have opened 3 issues for tracking show command wrapping, unify the length of character, wrapping position choice for non-english character

Post Reply