diff options
author | Joe Wilm <joe@jwilm.com> | 2018-02-15 18:35:49 -0800 |
---|---|---|
committer | Joe Wilm <joe@jwilm.com> | 2018-06-02 09:32:29 -0700 |
commit | 45c2b3fbf72fa6dfd36bee590e64314c6da7c6c2 (patch) | |
tree | 9f68a9692d0d0754264931d26e1a7cf0400471ed /src/grid/row.rs | |
parent | 94796a70fcbc11df2dc642057fef242466822067 (diff) | |
download | r-alacritty-45c2b3fbf72fa6dfd36bee590e64314c6da7c6c2.tar.gz r-alacritty-45c2b3fbf72fa6dfd36bee590e64314c6da7c6c2.tar.bz2 r-alacritty-45c2b3fbf72fa6dfd36bee590e64314c6da7c6c2.zip |
checkpoint: very basic scrolling works
Things that do not work
- Limiting how far back in the buffer it's possible to scroll
- Selections (need to transform to buffer offsets)
Diffstat (limited to 'src/grid/row.rs')
-rw-r--r-- | src/grid/row.rs | 18 |
1 files changed, 2 insertions, 16 deletions
diff --git a/src/grid/row.rs b/src/grid/row.rs index 1c83d45d..6b6af7c8 100644 --- a/src/grid/row.rs +++ b/src/grid/row.rs @@ -22,10 +22,7 @@ use index::Column; /// A row in the grid #[derive(Clone, Debug, Serialize, Deserialize, Eq, PartialEq)] -pub struct Row<T> { - data: Vec<T>, - id: u64 -} +pub struct Row<T>(Vec<T>); impl<T: Copy + Clone> Row<T> { pub fn new(columns: Column, template: &T) -> Row<T> { @@ -40,9 +37,8 @@ impl<T: Copy + Clone> Row<T> { /// Resets contents to the contents of `other` #[inline] - pub fn reset(&mut self, other: &Row<T>, id: u64) { + pub fn reset(&mut self, other: &Row<T>) { self.copy_from_slice(&**other); - self.id = id; } } @@ -52,16 +48,6 @@ impl<T> Row<T> { self.pop(); } } - - #[inline] - pub fn cells(&self) -> slice::Iter<T> { - self.0.iter() - } - - #[inline] - pub fn cells_mut(&mut self) -> slice::IterMut<T> { - self.0.iter_mut() - } } |