mirror of
https://github.com/alacritty/alacritty.git
synced 2024-11-11 13:51:01 -05:00
Fix reset CLI parameters on config reload (#3216)
Fix reset CLI parameters on config reload Fixes #3197.
This commit is contained in:
parent
f54aabfe92
commit
3203d2b3fa
3 changed files with 6 additions and 1 deletions
|
@ -23,6 +23,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|||
- Limited payload length in clipboard escape (used for Tmux copy/paste)
|
||||
- Alacritty not ignoring keyboard events for changing WM focus on X11
|
||||
- Regression which added a UNC path prefix to the working directory on Windows
|
||||
- CLI parameters discarded when config is reload
|
||||
|
||||
## 0.4.1
|
||||
|
||||
|
|
|
@ -150,7 +150,7 @@ fn read_config(path: &PathBuf) -> Result<Config> {
|
|||
let mut contents = fs::read_to_string(path)?;
|
||||
|
||||
// Remove UTF-8 BOM
|
||||
if contents.chars().nth(0) == Some('\u{FEFF}') {
|
||||
if contents.starts_with('\u{FEFF}') {
|
||||
contents = contents.split_off(3);
|
||||
}
|
||||
|
||||
|
|
|
@ -35,6 +35,7 @@ use alacritty_terminal::term::{SizeInfo, Term};
|
|||
use alacritty_terminal::tty;
|
||||
use alacritty_terminal::util::{limit, start_daemon};
|
||||
|
||||
use crate::cli::Options;
|
||||
use crate::config;
|
||||
use crate::config::Config;
|
||||
use crate::display::Display;
|
||||
|
@ -482,6 +483,9 @@ impl<N: Notify + OnResize> Processor<N> {
|
|||
processor.ctx.display_update_pending.message_buffer = Some(());
|
||||
|
||||
if let Ok(config) = config::reload_from(&path) {
|
||||
let options = Options::new();
|
||||
let config = options.into_config(config);
|
||||
|
||||
processor.ctx.terminal.update_config(&config);
|
||||
|
||||
if processor.ctx.config.font != config.font {
|
||||
|
|
Loading…
Reference in a new issue