diff options
author | Joe Wilm <joe@jwilm.com> | 2016-12-16 22:48:04 -0800 |
---|---|---|
committer | Joe Wilm <joe@jwilm.com> | 2016-12-16 22:48:04 -0800 |
commit | bde4dacc791501440515c1a51ad2fcb0256cf04c (patch) | |
tree | 66bd6762c4ae11705d1a82ed72112a408e5ec2d5 /src/term | |
parent | 781572096ea67516a98872b1b3c5b1ffaea9bae0 (diff) | |
download | alacritty-bde4dacc791501440515c1a51ad2fcb0256cf04c.tar.gz alacritty-bde4dacc791501440515c1a51ad2fcb0256cf04c.zip |
Misc formatting fixes
Diffstat (limited to 'src/term')
-rw-r--r-- | src/term/mod.rs | 24 |
1 files changed, 13 insertions, 11 deletions
diff --git a/src/term/mod.rs b/src/term/mod.rs index 1bed8134..777c3bce 100644 --- a/src/term/mod.rs +++ b/src/term/mod.rs @@ -343,8 +343,8 @@ impl Term { return; } - // Scroll up to keep cursor and as much context as possible in grid. This only runs when the - // lines decreases. + // Scroll up to keep cursor and as much context as possible in grid. + // This only runs when the lines decreases. self.scroll_region = Line(0)..self.grid.num_lines(); // Scroll up to keep cursor in terminal @@ -366,8 +366,9 @@ impl Term { self.cursor.col = limit(self.cursor.col, Column(0), num_cols); // Recreate tabs list - self.tabs = (Column(0)..self.grid.num_cols()).map(|i| (*i as usize) % TAB_SPACES == 0) - .collect::<Vec<bool>>(); + self.tabs = (Column(0)..self.grid.num_cols()) + .map(|i| (*i as usize) % TAB_SPACES == 0) + .collect::<Vec<bool>>(); self.tabs[0] = false; @@ -707,7 +708,8 @@ impl ansi::Handler for Term { ptr::copy(src, dst, n); } - // Clear last `count` cells in line. If deleting 1 char, need to delete 1 cell. + // Clear last `count` cells in line. If deleting 1 char, need to delete + // 1 cell. let template = self.empty_cell.clone(); let end = self.size_info.cols() - count; for c in &mut line[end..] { @@ -946,13 +948,13 @@ mod bench { /// Benchmark for the renderable cells iterator /// - /// The renderable cells iterator yields cells that require work to be displayed (that is, not a - /// an empty background cell). This benchmark measures how long it takes to process the whole - /// iterator. + /// The renderable cells iterator yields cells that require work to be + /// displayed (that is, not a an empty background cell). This benchmark + /// measures how long it takes to process the whole iterator. /// - /// When this benchmark was first added, it averaged ~78usec on my macbook pro. The total - /// render time for this grid is anywhere between ~1500 and ~2000usec (measured imprecisely with - /// the visual meter). + /// When this benchmark was first added, it averaged ~78usec on my macbook + /// pro. The total render time for this grid is anywhere between ~1500 and + /// ~2000usec (measured imprecisely with the visual meter). #[bench] fn render_iter(b: &mut test::Bencher) { // Need some realistic grid state; using one of the ref files. |