diff options
author | Christian Duerr <contact@christianduerr.com> | 2021-05-10 21:20:09 +0000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-05-10 21:20:09 +0000 |
commit | 6d8db6b9dfadd6164c4be7a053f25db8ef6b7998 (patch) | |
tree | bac5acfe2530ded1156f06508841114badf86e0d /alacritty/src/config/mod.rs | |
parent | d94c1e97a894cceb89237717a157d05e1a48f586 (diff) | |
download | r-alacritty-6d8db6b9dfadd6164c4be7a053f25db8ef6b7998.tar.gz r-alacritty-6d8db6b9dfadd6164c4be7a053f25db8ef6b7998.tar.bz2 r-alacritty-6d8db6b9dfadd6164c4be7a053f25db8ef6b7998.zip |
Fix default URL binding
The default binding for launching the URL hints was documented as
Ctrl+Shift+U, but never actually set. This adds this binding as the
default instead of having URLs only launchable using the mouse.
Diffstat (limited to 'alacritty/src/config/mod.rs')
-rw-r--r-- | alacritty/src/config/mod.rs | 18 |
1 files changed, 11 insertions, 7 deletions
diff --git a/alacritty/src/config/mod.rs b/alacritty/src/config/mod.rs index 4ddc81c2..e2476bb2 100644 --- a/alacritty/src/config/mod.rs +++ b/alacritty/src/config/mod.rs @@ -118,8 +118,7 @@ pub fn load(options: &Options) -> Config { config }); - // Override config with CLI options. - options.override_config(&mut config); + after_loading(&mut config, options); config } @@ -130,12 +129,20 @@ pub fn reload(config_path: &Path, options: &Options) -> Result<Config> { let config_options = options.config_options().clone(); let mut config = load_from(config_path, config_options)?; - // Override config with CLI options. - options.override_config(&mut config); + after_loading(&mut config, options); Ok(config) } +/// Modifications after the `Config` object is created. +fn after_loading(config: &mut Config, options: &Options) { + // Override config with CLI options. + options.override_config(config); + + // Create key bindings for regex hints. + config.ui_config.generate_hint_bindings(); +} + /// Load configuration file and log errors. fn load_from(path: &Path, cli_config: Value) -> Result<Config> { match read_config(path, cli_config) { @@ -159,9 +166,6 @@ fn read_config(path: &Path, cli_config: Value) -> Result<Config> { let mut config = Config::deserialize(config_value)?; config.ui_config.config_paths = config_paths; - // Create key bindings for regex hints. - config.ui_config.generate_hint_bindings(); - Ok(config) } |