[Users] TAB "expansion" and line wrapping
Paul Rolland
rol at witbe.net
Tue Jan 2 13:57:18 UTC 2024
Hello,
I think I'm facing an issue involving the presence of "TAB" in the message
and impacting the line wrapping. From my tests, it seems that a TAB is
always considered to be "8 spaces" when deciding if the line must be
wrapped.
So,
text<TAB><TAB>text
will be considered as 4 + 8 + 8 + 4 = 24 chars long when it should be
4 + 4 (TAB aligned to 8) + 8 + 4 = 20
in a Compose windows.
It seems this comes from compose_get_line_break_pos() in compose.c as we
are doing:
...
else if (*p == '\t')
col += 8;
...
without considering the current value of col, where we should round to the
next multiple of 8 instead. So something like :
col += 8 - (col % 8);
would probably be better.
Opinions ? Comments ? Do you want me to send a "proper" patch ?
Regards,
Rol
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 659 bytes
Desc: OpenPGP digital signature
URL: <http://lists.claws-mail.org/pipermail/users/attachments/20240102/04e9c177/attachment.sig>
More information about the Users
mailing list