From 655e3d3cbb996af0f70dbc8a097ab3b99bf00492 Mon Sep 17 00:00:00 2001 From: Dreck Sallow Date: Thu, 31 Oct 2024 23:57:32 -0500 Subject: [PATCH] fix: restore the cursor shape when exiting the app --- helix-term/src/application.rs | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/helix-term/src/application.rs b/helix-term/src/application.rs index a567815fc..f8da73fdf 100644 --- a/helix-term/src/application.rs +++ b/helix-term/src/application.rs @@ -1202,7 +1202,11 @@ impl Application { .backend_mut() .show_cursor(CursorKind::Block) .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(&mut self, input_stream: &mut S) -> Result