on master help sign in
Ignore errors when disabling mouse capture
commite9b23c29d8e8bca1d4140d02350bdae824a651b0 authorBlaž Hrastnik <blaz@mxxn.io> dateWed 20 Oct 2021, 00:00 (5 years ago) parent9688cb7
1 file changed+3−1
helix-term/src/application.rs+3−1
helix-term/src/application.rs+3−1
@@ -563,7 +563,9 @@ impl Application {
563563 let mut stdout = stdout();
564564 // reset cursor shape
565565 write!(stdout, "\x1B[2 q")?;
566− execute!(stdout, DisableMouseCapture)?;
566+ // Ignore errors on disabling, this might trigger on windows if we call
567+ // disable without calling enable previously
568+ let _ = execute!(stdout, DisableMouseCapture);
567569 execute!(stdout, terminal::LeaveAlternateScreen)?;
568570 terminal::disable_raw_mode()?;
569571 Ok(())