mirror of
https://github.com/alacritty/alacritty
synced 2024-09-29 04:23:53 +00:00
Fix config reloading
The main refactor broke config reloading; specifically, colors were not updating for subsequent draws.
This commit is contained in:
parent
f32199ae69
commit
fd11660c0a
|
@ -67,7 +67,7 @@ fn main() {
|
||||||
///
|
///
|
||||||
/// Creates a window, the terminal state, pty, I/O event loop, input processor,
|
/// Creates a window, the terminal state, pty, I/O event loop, input processor,
|
||||||
/// config change monitor, and runs the main display loop.
|
/// 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.
|
// Create a display.
|
||||||
//
|
//
|
||||||
// The display manages a window and can draw the terminal
|
// 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
|
// Handle config reloads
|
||||||
let config_updated = config_monitor.as_ref()
|
let config_updated = config_monitor.as_ref()
|
||||||
.and_then(|monitor| monitor.pending_config())
|
.and_then(|monitor| monitor.pending_config())
|
||||||
.map(|config| {
|
.map(|new_config| {
|
||||||
display.update_config(&config);
|
display.update_config(&config);
|
||||||
processor.update_config(&config);
|
processor.update_config(&config);
|
||||||
|
config = new_config;
|
||||||
true
|
true
|
||||||
}).unwrap_or(false);
|
}).unwrap_or(false);
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue