Just like how we use std::atexit() on enable_raw_mode()here, we can do the same on enter_alt_mode() -- and then clean up the usage on the examples.
Could also clean up a few perror calls to throw exceptions as well where possible - some might need new exception types to be relevant, see grep -rn "throw" rawterm for where I'm already doing that
Just like how we use
std::atexit()
onenable_raw_mode()
here, we can do the same onenter_alt_mode()
-- and then clean up the usage on the examples.Could also clean up a few
perror
calls to throw exceptions as well where possible - some might need new exception types to be relevant, seegrep -rn "throw" rawterm
for where I'm already doing that