henriklovhaug / md-tui

Markdown renderer in the terminal
GNU Affero General Public License v3.0
208 stars 13 forks source link

Rendered output is corrupted when not scrolled #151

Open orhun opened 3 months ago

orhun commented 3 months ago

This something that I experienced while working on #150

This is how the markdown is rendered when set_scroll is not called:

image

It is fixed when I add this line:

https://github.com/orhun/md-tui/blob/75ff3bbe1af19056a0ce61e6b4824b4dfda3a49b/examples/demo.rs#L85

image

Which makes me think, maybe we should call this method somewhere internally just to make sure that render isn't corrupted?

Or we can get to the bottom of this and figure out something else 🤔

orhun commented 3 months ago

damn we're pwned