Skip to content

Commit

Permalink
review changes
Browse files Browse the repository at this point in the history
  • Loading branch information
PotatoesFall committed Jun 4, 2024
1 parent 1e3c2ff commit 77831bb
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions helix-term/src/commands.rs
Original file line number Diff line number Diff line change
Expand Up @@ -145,14 +145,13 @@ impl<'a> Context<'a> {

/// Waits on all pending jobs, and then tries to flush all pending write
/// operations for all documents.
pub fn block_try_flush_writes(&mut self) {
pub fn block_try_flush_writes(&mut self) -> anyhow::Result<()> {
compositor::Context {
editor: self.editor,
jobs: self.jobs,
scroll: None,
}
.block_try_flush_writes()
.ok();
}
}

Expand Down Expand Up @@ -5838,10 +5837,10 @@ fn shell_prompt(cx: &mut Context, prompt: Cow<'static, str>, behavior: ShellBeha
);
}

fn suspend(cx: &mut Context) {
fn suspend(_cx: &mut Context) {
#[cfg(not(windows))]
{
cx.block_try_flush_writes();
_cx.block_try_flush_writes().ok();
signal_hook::low_level::raise(signal_hook::consts::signal::SIGTSTP).unwrap();
}
}
Expand Down

0 comments on commit 77831bb

Please sign in to comment.