aboutsummaryrefslogtreecommitdiff
path: root/src/main.rs
diff options
context:
space:
mode:
authorJoe Wilm <joe@jwilm.com>2016-12-16 23:12:44 -0800
committerJoe Wilm <joe@jwilm.com>2016-12-16 23:12:44 -0800
commitfd11660c0a714852a3f477a6730d49b9694e1345 (patch)
tree9e93ca61c0f61aee0d94aec457be6f63e565b968 /src/main.rs
parentf32199ae690c169af95cb9c2c91bdf8a9fda3227 (diff)
downloadalacritty-fd11660c0a714852a3f477a6730d49b9694e1345.tar.gz
alacritty-fd11660c0a714852a3f477a6730d49b9694e1345.zip
Fix config reloading
The main refactor broke config reloading; specifically, colors were not updating for subsequent draws.
Diffstat (limited to 'src/main.rs')
-rw-r--r--src/main.rs5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/main.rs b/src/main.rs
index 409f1c93..18a7e322 100644
--- a/src/main.rs
+++ b/src/main.rs
@@ -67,7 +67,7 @@ fn main() {
///
/// Creates a window, the terminal state, pty, I/O event loop, input processor,
/// config change monitor, and runs the main display loop.
-fn run(config: Config, options: cli::Options) -> Result<(), Box<Error>> {
+fn run(mut config: Config, options: cli::Options) -> Result<(), Box<Error>> {
// Create a display.
//
// The display manages a window and can draw the terminal
@@ -133,9 +133,10 @@ fn run(config: Config, options: cli::Options) -> Result<(), Box<Error>> {
// Handle config reloads
let config_updated = config_monitor.as_ref()
.and_then(|monitor| monitor.pending_config())
- .map(|config| {
+ .map(|new_config| {
display.update_config(&config);
processor.update_config(&config);
+ config = new_config;
true
}).unwrap_or(false);