diff options
-rw-r--r-- | CHANGELOG.md | 1 | ||||
-rw-r--r-- | alacritty/src/config/mod.rs | 16 |
2 files changed, 11 insertions, 6 deletions
diff --git a/CHANGELOG.md b/CHANGELOG.md index fd096e62..b042f01c 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -34,6 +34,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/). - Window not being completely opaque on Windows - Window being always on top during alt-tab on Windows - Cursor position not reported to apps when mouse is moved with button held outside of window +- No live config update when starting Alacritty with a broken configuration file ### Removed diff --git a/alacritty/src/config/mod.rs b/alacritty/src/config/mod.rs index 6fe58537..14afc7d1 100644 --- a/alacritty/src/config/mod.rs +++ b/alacritty/src/config/mod.rs @@ -100,17 +100,21 @@ pub fn load(options: &Options) -> Config { let config_options = options.config_options().clone(); let config_path = options.config_path().or_else(installed_config); - if config_path.is_none() { - info!(target: LOG_TARGET_CONFIG, "No config file found; using default"); - } - // Load the config using the following fallback behavior: // - Config path + CLI overrides // - CLI overrides // - Default let mut config = config_path - .and_then(|config_path| load_from(&config_path, config_options.clone()).ok()) - .unwrap_or_else(|| Config::deserialize(config_options).unwrap_or_default()); + .as_ref() + .and_then(|config_path| load_from(config_path, config_options.clone()).ok()) + .unwrap_or_else(|| { + let mut config = Config::deserialize(config_options).unwrap_or_default(); + match config_path { + Some(config_path) => config.ui_config.config_paths.push(config_path), + None => info!(target: LOG_TARGET_CONFIG, "No config file found; using default"), + } + config + }); // Override config with CLI options. options.override_config(&mut config); |