From 6e4db86f7efa4b8fd7e27971a6df0628a91f583a Mon Sep 17 00:00:00 2001 From: Wez Furlong Date: Sat, 1 Jun 2019 15:55:08 -0700 Subject: [PATCH] add palette to the terminal state --- term/src/terminalstate.rs | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/term/src/terminalstate.rs b/term/src/terminalstate.rs index 72c13bafa..7d0dfaaaa 100644 --- a/term/src/terminalstate.rs +++ b/term/src/terminalstate.rs @@ -2,6 +2,7 @@ // and inclusive range #![cfg_attr(feature = "cargo-clippy", allow(clippy::range_plus_one))] use super::*; +use crate::color::ColorPalette; use failure::bail; use image::{self, GenericImageView}; use ordered_float::NotNan; @@ -206,6 +207,7 @@ pub struct TerminalState { /// The terminal title string title: String, + palette: ColorPalette, } /// Like Write::write_all except that we keep looping @@ -276,6 +278,7 @@ impl TerminalState { tabs: TabStop::new(physical_cols, 8), hyperlink_rules, title: "wezterm".to_string(), + palette: ColorPalette::default(), } } @@ -283,6 +286,10 @@ impl TerminalState { &self.title } + pub fn palette(&self) -> &ColorPalette { + &self.palette + } + pub fn screen(&self) -> &Screen { &self.screen }