Skip to content

Commit

Permalink
respond to SIGUSR1 by reloading config
Browse files Browse the repository at this point in the history
  • Loading branch information
krgn committed Sep 23, 2022
1 parent 42e30e7 commit 69d4dcb
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions helix-term/src/application.rs
Original file line number Diff line number Diff line change
Expand Up @@ -224,8 +224,8 @@ impl Application {
#[cfg(windows)]
let signals = futures_util::stream::empty();
#[cfg(not(windows))]
let signals =
Signals::new(&[signal::SIGTSTP, signal::SIGCONT]).context("build signal handler")?;
let signals = Signals::new(&[signal::SIGTSTP, signal::SIGCONT, signal::SIGUSR1])
.context("build signal handler")?;

let app = Self {
compositor,
Expand Down Expand Up @@ -426,6 +426,10 @@ impl Application {
self.compositor.load_cursor();
self.render();
}
signal::SIGUSR1 => {
self.refresh_config();
self.render();
}
_ => unreachable!(),
}
}
Expand Down

0 comments on commit 69d4dcb

Please sign in to comment.