aboutsummaryrefslogtreecommitdiff
path: root/src/term/mod.rs
diff options
context:
space:
mode:
authorChristian Duerr <chrisduerr@users.noreply.github.com>2019-01-17 09:17:26 +0000
committerGitHub <noreply@github.com>2019-01-17 09:17:26 +0000
commit0d16478f5d997b6da5488885e15bfb09ca8e7f6d (patch)
tree9905e264149d5955ce1161ecf41ad2f23ec9ec91 /src/term/mod.rs
parent5864c30a54b250163c3a94f053f5f1b907adf9c9 (diff)
downloadalacritty-0d16478f5d997b6da5488885e15bfb09ca8e7f6d.tar.gz
alacritty-0d16478f5d997b6da5488885e15bfb09ca8e7f6d.zip
Make all configuration fields optional
All configuration fields now have fallback values which will be used if the field is not present. This includes mouse, key bindings and platform specific differences. The mouse and key bindings are now filled by default, if the user rebinds a default mapping, it will be overwritten. To unbind a default binding, it can be mapped to `chars: ""`. Since all platform differences can now be correctly handled by the `src/config/mod.rs` code, it's no longer necessary to maintain separate configuration files, so the `alacritty_macos.yml` and `alacritty_windows.yml` have been deleted. Fixes #40. Fixes #1923.
Diffstat (limited to 'src/term/mod.rs')
-rw-r--r--src/term/mod.rs6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/term/mod.rs b/src/term/mod.rs
index 07cd27aa..c435d501 100644
--- a/src/term/mod.rs
+++ b/src/term/mod.rs
@@ -897,6 +897,8 @@ impl Term {
let scroll_region = Line(0)..grid.num_lines();
+ let colors = color::List::from(config.colors());
+
Term {
next_title: None,
next_mouse_cursor: None,
@@ -917,9 +919,9 @@ impl Term {
mode: Default::default(),
scroll_region,
size_info: size,
- colors: color::List::from(config.colors()),
+ colors,
color_modified: [false; color::COUNT],
- original_colors: color::List::from(config.colors()),
+ original_colors: colors,
semantic_escape_chars: config.selection().semantic_escape_chars.clone(),
cursor_style: None,
default_cursor_style: config.cursor_style(),