tiny icon indicating copy to clipboard operation
tiny copied to clipboard

Zero Width Spaced Nicks

Open Ryuuusuke opened this issue 8 months ago • 2 comments

We like matterbridge because It let us to bridge discord message without having us to open discord. But I found that ZWSP Inside a nick will be count as regular space

So zero width spaced nick should be like this

<Lorem>

become like this inside the client

<L orem>

I included secreenshot here Image

Some reference https://github.com/42wim/matterbridge/issues/175

Love your client btw. Pretty Cool :3

Ryuuusuke avatar Jun 11 '25 13:06 Ryuuusuke

Thanks for reporting.

I think this function needs an update to not increment the X coordinate on zero-width chars: https://github.com/osa1/tiny/blob/8747b6ba89c95dc6c1793404065d232341a6df08/crates/libtiny_tui/src/termbox.rs#L6-L22

I can try fixing this later this evening, but if you're up for it in the meantime feel free to update that function, and if it fixes the issue a PR would be nice, too 😄 You can use the unicode_width crate, which we already depend on.

osa1 avatar Jun 11 '25 13:06 osa1

Just an update: I spent some time trying to debug this but it turned out to be a bit more involved. The code shown above is not used to draw nicks.

osa1 avatar Jun 13 '25 21:06 osa1