kimtore / pms

Practical Music Search is an interactive Vim-like console client for the Music Player Daemon.
https://ambientsound.github.io/pms/
MIT License
249 stars 23 forks source link

songlists don't handle display width #138

Closed shmibs closed 8 months ago

shmibs commented 8 months ago

it seems SongListWidget naïvely tries just to display one rune into one cell, but this won't work for most? of unicode. i think there are multiple issues here of like:

to handle this "properly" must be quite hard (looks like tcell library has issue discussion about), but for at least displaying wide characters it must be easier partial fix. currently a name like 青葉市子 gets displayed as 青市, because wide chars overflow into the next cell displaying. it seems tcell used https://github.com/mattn/go-runewidth for this?

kimtore commented 8 months ago

Hi @shmibs, thanks for reporting.

Try the latest build and see if that fixes the issue? My dataset is somewhat limited when it comes to wide character unicode. There might be other UI elements affected where this issue might pop up again, feel free to address them in this issue as well if you find any.

shmibs commented 8 months ago

ah yes, this seems working in songlists now!

and mmm, but it's still doing the same in the now-playing, list name, etc

2023-1703343482

kimtore commented 8 months ago

@shmibs, I sorted out all the issues I could find regarding wide characters. Feel free to open another issue if you find more of these.