From 31ed5160a0b71f37c723d78b539003bc5227f184 Mon Sep 17 00:00:00 2001 From: Joe Wilm Date: Fri, 24 Feb 2017 08:23:07 -0800 Subject: Change cursor colors config to use text and cursor This changes the cursor color config to use the `text` and `cursor` properties instead of the current `foreground` and `background` properties. The latter names stop making sense when dealing with cursors like a vertical bar or underscore. In the new system, the block, underscore, or vertical bar would always take the color of `cursor`, and the text would take the color of `text` when using a block, or keep its normal color when using the underscore or vertical bar. A warning is now emitted on startup when the old form of cursor color config is used. This will be a hard error in the future. --- src/term/mod.rs | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'src/term/mod.rs') diff --git a/src/term/mod.rs b/src/term/mod.rs index 786265ef..126d34e3 100644 --- a/src/term/mod.rs +++ b/src/term/mod.rs @@ -91,9 +91,8 @@ impl<'a> RenderableCellsIter<'a> { if self.config.custom_cursor_colors() { let cell = &mut self.grid[self.cursor]; - cell.fg = Color::Named(NamedColor::CursorForeground); - cell.bg = Color::Named(NamedColor::CursorBackground); - + cell.fg = Color::Named(NamedColor::CursorText); + cell.bg = Color::Named(NamedColor::Cursor); } else { let cell = &mut self.grid[self.cursor]; mem::swap(&mut cell.fg, &mut cell.bg); -- cgit