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

How to deal with overflowing lines? #204

Open
roele opened this issue Jan 24, 2024 · 0 comments
Open

How to deal with overflowing lines? #204

roele opened this issue Jan 24, 2024 · 0 comments

Comments

@roele
Copy link

roele commented Jan 24, 2024

I am having trouble with clearing when lines overflow. If all the lines of the output are within the terminal width, the terminal is cleared properly via the following.

self.term.clear_to_end_of_screen()?;
self.term.clear_last_lines(self.height)?; // height being the number of lines of the written output

But when one of the lines (see screenshow) overflows, the first line of the output is not cleared and written all over again. Even if i account for overflowing lines and increase the height to clear, the first line is not cleared.

Screenshot

Any ideas how to mitigate this?

Example Source

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

1 participant