jmacdonald / amp

A complete text editor for your terminal.
https://amp.rs
Other
3.68k stars 105 forks source link

Switch to termion's AlternateScreen for restoring the terminal after quitting. #203

Closed christoph-heiss closed 3 years ago

christoph-heiss commented 3 years ago

This is a very small and simple change for basically convenience reasons only, nothing major. With this change, amp will restore the terminal state (i.e. all previous output) when quitting, not clearing the screen, which looks a lot cleaner.

According to https://docs.rs/termion/1.5.5/termion/screen/index.html, this feature should be supported by virtually any terminal implementing xterm. So probably reasonable for us to assume this is supported.

jmacdonald commented 3 years ago

Thanks again for this, @christoph-heiss! :beers: