diff options
Diffstat (limited to 'helix-term')
-rw-r--r-- | helix-term/src/application.rs | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/helix-term/src/application.rs b/helix-term/src/application.rs index 4d28c8be..cda498e2 100644 --- a/helix-term/src/application.rs +++ b/helix-term/src/application.rs @@ -471,7 +471,17 @@ impl Application { } } signal::SIGCONT => { - self.claim_term().await.unwrap(); + // Copy/Paste from same issue from neovim: + // https://github.com/neovim/neovim/issues/12322 + // https://github.com/neovim/neovim/pull/13084 + for retries in 1..=10 { + match self.claim_term().await { + Ok(()) => break, + Err(err) if retries == 10 => panic!("Failed to claim terminal: {}", err), + Err(_) => continue, + } + } + // redraw the terminal let area = self.terminal.size().expect("couldn't get terminal size"); self.compositor.resize(area); |