diff options
author | Christian Duerr <chrisduerr@users.noreply.github.com> | 2019-04-20 22:47:05 +0000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-04-20 22:47:05 +0000 |
commit | 0d060d5d801e3abb55035269138d819d38fc175b (patch) | |
tree | 7e5e6a390aa57ff8caafc782b2371634c906b3c9 /src/config/mod.rs | |
parent | 371d13f8ef95157c97f7de9964bcbc89d4a8e930 (diff) | |
download | alacritty-0d060d5d801e3abb55035269138d819d38fc175b.tar.gz alacritty-0d060d5d801e3abb55035269138d819d38fc175b.zip |
Fix cursor colors
This fixes a recent regression in
cfc20d4f34dca535654cc32df18e785296af4cc5 which broke cursor colors when
specified in the `colors.cursor` field in the config.
It also removes a lot of unneeded code from the font crate related to
the cursor rendering.
This fixes #2338.
Diffstat (limited to 'src/config/mod.rs')
-rw-r--r-- | src/config/mod.rs | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/config/mod.rs b/src/config/mod.rs index 3cd33eac..67431e68 100644 --- a/src/config/mod.rs +++ b/src/config/mod.rs @@ -21,7 +21,7 @@ use serde::de::{MapAccess, Unexpected, Visitor}; use serde::{self, de, Deserialize}; use serde_yaml; -use crate::ansi::{Color, CursorStyle, NamedColor}; +use crate::ansi::CursorStyle; use crate::cli::Options; use crate::index::{Column, Line}; use crate::input::{Action, Binding, KeyBinding, MouseBinding}; @@ -1877,14 +1877,14 @@ impl Config { /// Cursor foreground color #[inline] - pub fn cursor_text_color(&self) -> Option<Color> { - self.colors.cursor.text.map(|_| Color::Named(NamedColor::CursorText)) + pub fn cursor_text_color(&self) -> Option<Rgb> { + self.colors.cursor.text } /// Cursor background color #[inline] - pub fn cursor_cursor_color(&self) -> Option<Color> { - self.colors.cursor.cursor.map(|_| Color::Named(NamedColor::Cursor)) + pub fn cursor_cursor_color(&self) -> Option<Rgb> { + self.colors.cursor.cursor } /// Enable experimental conpty backend (Windows only) |