fix: restore the cursor shape when exiting the app

pull/11983/head
Dreck Sallow 3 weeks ago
parent 38faf74feb
commit 655e3d3cbb

@ -1202,7 +1202,11 @@ impl Application {
.backend_mut() .backend_mut()
.show_cursor(CursorKind::Block) .show_cursor(CursorKind::Block)
.ok(); .ok();
self.terminal.restore(terminal_config)
use std::io::Write;
self.terminal.restore(terminal_config)?;
write!(std::io::stdout(), "\x1B[0 q") // reset to cursor shape
} }
pub async fn run<S>(&mut self, input_stream: &mut S) -> Result<i32, Error> pub async fn run<S>(&mut self, input_stream: &mut S) -> Result<i32, Error>

Loading…
Cancel
Save