MCMrARM / revolution-irc

A modern Android IRC client. #revolutionirc on Libera.chat
GNU General Public License v3.0
548 stars 63 forks source link

Handle extended colour codes #332

Open kurahaupo opened 1 year ago

kurahaupo commented 1 year ago
kurahaupo commented 1 year ago

(please squash before merging)

kurahaupo commented 1 year ago

This patch also fixes a bug where a digit following a colour code would sometimes be taken to be part of that code. (It ensures that when sending a colour code, it always ends with two digits when it's followed by a literal digit).

It also applies some minor optimisations to send bold/italic/underline to reset those attributes (since they're defined to be toggles), rather than sending a reset and the have to re-enable all other attributes. (It still sends a reset when intending to reach the default state, to minimise the effects in other clients that might mishandle toggled attribute.)