@@ -395,7 +395,6 @@ impl Application {
395 use helix_view::graphics::Rect;
395 use helix_view::graphics::Rect;
396 match signal {
396 match signal {
397 signal::SIGTSTP => {
397 signal::SIGTSTP => {
398− self.compositor.save_cursor();
399 restore_term().unwrap();
398 restore_term().unwrap();
400 low_level::emulate_default_handler(signal::SIGTSTP).unwrap();
399 low_level::emulate_default_handler(signal::SIGTSTP).unwrap();
@@ -404,7 +403,6 @@ impl Application {
404 // redraw the terminal
403 // redraw the terminal
405 let Rect { width, height, .. } = self.compositor.size();
404 let Rect { width, height, .. } = self.compositor.size();
406 self.compositor.resize(width, height);
405 self.compositor.resize(width, height);
407− self.compositor.load_cursor();
408 self.render();
406 self.render();
410 signal::SIGUSR1 => {
408 signal::SIGUSR1 => {
@@ -924,7 +922,12 @@ impl Application {
926 async fn claim_term(&mut self) -> Result<(), Error> {
924 async fn claim_term(&mut self) -> Result<(), Error> {
925+ use helix_view::graphics::CursorKind;
926+ use tui::backend::Backend;
927 terminal::enable_raw_mode()?;
927 terminal::enable_raw_mode()?;
928+ if self.compositor.terminal.cursor_kind() == CursorKind::Hidden {
929+ self.compositor.terminal.backend_mut().hide_cursor().ok();
928 let mut stdout = stdout();
931 let mut stdout = stdout();
929 execute!(
932 execute!(
@@ -958,6 +961,15 @@ impl Application {
958 self.event_loop(input_stream).await;
961 self.event_loop(input_stream).await;
960 let close_errs = self.close().await;
963 let close_errs = self.close().await;
965+ use helix_view::graphics::CursorKind;
966+ use tui::backend::Backend;
970+ .show_cursor(CursorKind::Block)
961 restore_term()?;
973 restore_term()?;
963 for err in close_errs {
975 for err in close_errs {