Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

The screen is breaking when going through podcasts #166

Open
MCWertGaming opened this issue Apr 20, 2021 · 5 comments
Open

The screen is breaking when going through podcasts #166

MCWertGaming opened this issue Apr 20, 2021 · 5 comments

Comments

@MCWertGaming
Copy link

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?

@xgi
Copy link
Owner

xgi commented Apr 23, 2021

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:

castero/castero/menu.py

Lines 137 to 138 in 057ba7f

self._window.addstr(self._display_start_y + position, 0,
self._pad_text(text), attr)

_pad_text:

castero/castero/menu.py

Lines 105 to 106 in 057ba7f

max_width = self._window.getmaxyx()[1] - 1
return text.ljust(max_width)[:max_width]

@MCWertGaming
Copy link
Author

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.

@MCWertGaming
Copy link
Author

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?

@MCWertGaming
Copy link
Author

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.

@dammmn
Copy link

dammmn commented Aug 5, 2021

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants