Skip to content

Commit

Permalink
Fix crash on opening from suspend state (helix-editor#6725)
Browse files Browse the repository at this point in the history
  • Loading branch information
h1t committed Apr 15, 2023
1 parent 4cdba7c commit f15cd8c
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion helix-term/src/application.rs
Original file line number Diff line number Diff line change
Expand Up @@ -471,7 +471,16 @@ impl Application {
}
}
signal::SIGCONT => {
self.claim_term().await.unwrap();
// Copy/Paste from same issue from neovim:
// https://github.com/neovim/neovim/issues/12322
let mut retry_count = 10;
while retry_count > 0 {
match self.claim_term().await {
Ok(_) => break,
Err(_) => retry_count -= 1,
}
}

// redraw the terminal
let area = self.terminal.size().expect("couldn't get terminal size");
self.compositor.resize(area);
Expand Down

0 comments on commit f15cd8c

Please sign in to comment.