diff options
author | Joe Wilm <joe@jwilm.com> | 2017-04-18 10:42:29 -0700 |
---|---|---|
committer | Joe Wilm <joe@jwilm.com> | 2017-04-18 19:53:31 -0700 |
commit | a3d00f01b136ce95613bb20db9e05bfe9342185b (patch) | |
tree | e13174b9c9d7c531a4be66b849b0d84578d1e6dc /src/term/mod.rs | |
parent | a27f166ef92b7782ee5833bf51d8559d1bb47934 (diff) | |
download | alacritty-a3d00f01b136ce95613bb20db9e05bfe9342185b.tar.gz alacritty-a3d00f01b136ce95613bb20db9e05bfe9342185b.zip |
Fixes for vttest cursor movement screen 1
Diffstat (limited to 'src/term/mod.rs')
-rw-r--r-- | src/term/mod.rs | 16 |
1 files changed, 15 insertions, 1 deletions
diff --git a/src/term/mod.rs b/src/term/mod.rs index 1e9201aa..990a574b 100644 --- a/src/term/mod.rs +++ b/src/term/mod.rs @@ -1101,6 +1101,19 @@ impl ansi::Handler for Term { } #[inline] + fn dectest(&mut self) { + trace!("dectest"); + let mut template = self.cursor.template; + template.c = 'E'; + + for row in &mut self.grid.lines_mut() { + for cell in row { + cell.reset(&template); + } + } + } + + #[inline] fn goto(&mut self, line: Line, col: Column) { trace!("goto: line={}, col={}", line, col); self.cursor.point.line = min(line, self.grid.num_lines() - 1); @@ -1471,7 +1484,8 @@ impl ansi::Handler for Term { } } // Clear up to the current column in the current line - for cell in &mut self.grid[self.cursor.point.line][..self.cursor.point.col] { + let end = min(self.cursor.point.col + 1, self.grid.num_cols()); + for cell in &mut self.grid[self.cursor.point.line][..end] { cell.reset(&template); } }, |