castero icon indicating copy to clipboard operation
castero copied to clipboard

The screen is breaking when going through podcasts

Open staxfur opened this issue 4 years ago • 5 comments

I have added some podcasts to castero and have noticed that characters of the page shown before just stay on the screen and the new one gets drawn over it which results in messed up text. Also the left border sometimes just breaks and never recovers.

Here is an example: image image image

Sometimes the text is even on the border. Is this a general problem of castero?

staxfur avatar Apr 20 '21 16:04 staxfur

I wasn't able to reproduce this either. The way the menu display works is that it pads each entry to the width of the window by adding spaces at the end. So trailing empty space is rewritten every time the menu is moved (which is how it is currently working for me). I suspect that this is related to your unicode issue; perhaps because some characters aren't being rendered, it's padding with the assumption that those characters are included.

(relevant code)

_draw_item: https://github.com/xgi/castero/blob/057ba7fe6a6a187456865091b79dad8c4f849d25/castero/menu.py#L137-L138

_pad_text: https://github.com/xgi/castero/blob/057ba7fe6a6a187456865091b79dad8c4f849d25/castero/menu.py#L105-L106

xgi avatar Apr 23 '21 20:04 xgi

Thank you for your reply. It is quiet strange that these issues are only appearing on my machine. I'll try testing it on another Terminal. I use kitty on archlinux, but all other terminal applications are just working fine.

staxfur avatar Apr 24 '21 11:04 staxfur

I have checked on that and there are no issues on xterm. The strange thing though is that all other terminal applications (none in python though) have no issues at all. Maybe its due to the python library? Really strange thing. I'm developing terminal applications myself so I know that pure ANSI has no problem at all in Kitty. Do have an Idea what could be the cause of this?

staxfur avatar Apr 24 '21 14:04 staxfur

Also it's the same for the unicode problem - no issue on xterm, but on kitty. Also printing those characters with 'echo' or using C++ has no issue, really strange.

staxfur avatar Apr 24 '21 14:04 staxfur

I can confirm the same: xterm is all fine, st is also fine. All those new terminal emulators with acceleration could be the reason for these symptoms.

dammmn avatar Aug 05 '21 13:08 dammmn