1
1
mirror of https://github.com/wez/wezterm.git synced 2024-11-23 23:21:08 +03:00

add palette to the terminal state

This commit is contained in:
Wez Furlong 2019-06-01 15:55:08 -07:00
parent d18dbe9ff7
commit 6e4db86f7e

View File

@ -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
}