@@ -471,7 +471,17 @@ impl Application {
473 signal::SIGCONT => {
473 signal::SIGCONT => {
474+ // Copy/Paste from same issue from neovim:
475+ // https://github.com/neovim/neovim/issues/12322
476+ // https://github.com/neovim/neovim/pull/13084
477+ for retries in 1..=10 {
474− self.claim_term().await.unwrap();
478+ match self.claim_term().await {
480+ Err(err) if retries == 10 => panic!("Failed to claim terminal: {}", err),
475 // redraw the terminal
485 // redraw the terminal
476 let area = self.terminal.size().expect("couldn't get terminal size");
486 let area = self.terminal.size().expect("couldn't get terminal size");
477 self.compositor.resize(area);
487 self.compositor.resize(area);