atanunq / viuer

Rust library for displaying images in the terminal.
MIT License
241 stars 43 forks source link

Printing broken when in raw mode #23

Closed lilithium-hydride closed 3 years ago

lilithium-hydride commented 3 years ago

When placing the terminal into raw mode (through Termion, etc.), each pair of rows will shift over such that the start of every new row is the x offset away from the previous row's end, resembling a stair pattern. From what I can see on the outside, it looks like it's just using a line break and expecting that it will also be properly returned to the beginning of the line after, which would not be the case in raw mode. I'm not experienced in Rust enough to personally confirm this, though. It'd be helpful if this behavior could be altered, perhaps through the Config struct.

lilithium-hydride commented 3 years ago

First time opening a pull request, please tell me if I've messed up on anything 😄. This doesn't appear to change the behavior of anything outside of raw mode, so I don't think an extra config option would be warranted, but it does fix the issue.