aboutsummaryrefslogtreecommitdiff
path: root/src/grid.rs
diff options
context:
space:
mode:
authorJoe Wilm <joe@jwilm.com>2017-02-11 12:49:40 -0800
committerJoe Wilm <jwilm@users.noreply.github.com>2017-02-11 14:18:05 -0800
commit908ea5543a40b772d2336e2ce981aae61dc6b2d7 (patch)
tree65c265378a75e214a0bc05f74de8c50156cc8dee /src/grid.rs
parentd2e8a0cd103a4923d296136ac499ce026fdd625a (diff)
downloadalacritty-908ea5543a40b772d2336e2ce981aae61dc6b2d7.tar.gz
alacritty-908ea5543a40b772d2336e2ce981aae61dc6b2d7.zip
Move color list to Term struct
The color list needs to be updated by the parser, and this isn't possible if it's on the config. This change makes sense semantically as well since it's really part of the terminal state. This is in preparation for OSC color parsing.
Diffstat (limited to 'src/grid.rs')
-rw-r--r--src/grid.rs15
1 files changed, 15 insertions, 0 deletions
diff --git a/src/grid.rs b/src/grid.rs
index c886807b..1c5b94c4 100644
--- a/src/grid.rs
+++ b/src/grid.rs
@@ -38,6 +38,21 @@ pub trait BidirectionalIterator: Iterator {
fn prev(&mut self) -> Option<Self::Item>;
}
+pub struct Indexed<T> {
+ pub line: Line,
+ pub column: Column,
+ pub inner: T
+}
+
+impl<T> Deref for Indexed<T> {
+ type Target = T;
+
+ #[inline]
+ fn deref(&self) -> &T {
+ &self.inner
+ }
+}
+
/// Represents the terminal display contents
#[derive(Clone, Debug, Deserialize, Serialize, Eq, PartialEq)]
pub struct Grid<T> {