summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorJoe Wilm <joe@jwilm.com>2016-11-28 14:27:52 -0800
committerJoe Wilm <joe@jwilm.com>2016-12-11 20:23:41 -0800
commit74dcba59d8bec0a228cf1350bccab2aabd0304dd (patch)
tree305b00d6be352832ed9210bd1abd6eb6e6439322 /src
parent30bee80a6902eb09c51bed9c9f54c7617c4d53db (diff)
downloadalacritty-74dcba59d8bec0a228cf1350bccab2aabd0304dd.tar.gz
alacritty-74dcba59d8bec0a228cf1350bccab2aabd0304dd.zip
Document a couple of methods
Also fixes formatting on the Term::new method signature.
Diffstat (limited to 'src')
-rw-r--r--src/term.rs13
1 files changed, 10 insertions, 3 deletions
diff --git a/src/term.rs b/src/term.rs
index a877d260..618e3697 100644
--- a/src/term.rs
+++ b/src/term.rs
@@ -342,9 +342,7 @@ impl SizeInfo {
}
impl Term {
- pub fn new(
- size: SizeInfo
- ) -> Term {
+ pub fn new(size: SizeInfo) -> Term {
let template = Cell::new(
' ',
cell::Color::Ansi(Color::Foreground),
@@ -399,10 +397,19 @@ impl Term {
Some((line, col))
}
+ /// Access to the raw grid data structure
+ ///
+ /// This is a bit of a hack; when the window is closed, the event processor
+ /// serializes the grid state to a file.
pub fn grid(&self) -> &Grid<Cell> {
&self.grid
}
+ /// Iterate over the *renderable* cells in the terminal
+ ///
+ /// A renderable cell is any cell which has content other than the default
+ /// background color. Cells with an alternate background color are
+ /// considered renderable as are cells with any text content.
pub fn renderable_cells<'a>(&'a mut self) -> RenderableCellsIter<'a> {
RenderableCellsIter::new(&mut self.grid, &self.cursor, self.mode)
}