makew0rld / amfora

A fancy terminal browser for the Gemini protocol.
GNU General Public License v3.0
1.13k stars 68 forks source link

Failed emoji ZWJ sequences stick to view #254

Open luetage opened 2 years ago

luetage commented 2 years ago

I’m gonna try to explain this… I’m using Alacritty, which is unable to display emoji ZWJ sequences, instead it displays all graphemes of the sequence. This is fine, but with Amfora the additional graphemes stick and will continue to display on every page until one of the pages happens to overwrite the line and column the emoji is being displayed on. I thought maybe the view could be cleared somehow before loading a page.

Example page: gemini://freeshell.de/gemlog/2021-09-15.gmi

emoji-sequence

emoji-sticks

I can reproduce this behavior on Gnome terminal.

makew0rld commented 2 years ago

Wow, interesting. I think I've experienced before on Guake and Tilix terminals, but dismissed it as a terminal unicode issue. I have reproduced this on Tilix just now.

Since this is appearing on all these terminals, including Alacritty which iirc is built from scratch, this must be an Amfora issue, or rather an upstream one with cview or tcell.

If I can create a small test case for this that reproduces the bug only using cview, I'll file an issue. Anyone else is welcome to try and create one as well.

luetage commented 2 years ago

To add to this, the residual graphemes are never properly overwritten. After browsing for a while and using the scrollwheel on an almost empty page (new tab), the emoji show up multiplied.

residual-emoji