aboutsummaryrefslogtreecommitdiff
path: root/src/ansi.rs
diff options
context:
space:
mode:
authorJoe Wilm <joe@jwilm.com>2017-04-18 10:42:29 -0700
committerJoe Wilm <joe@jwilm.com>2017-04-18 19:53:31 -0700
commita3d00f01b136ce95613bb20db9e05bfe9342185b (patch)
treee13174b9c9d7c531a4be66b849b0d84578d1e6dc /src/ansi.rs
parenta27f166ef92b7782ee5833bf51d8559d1bb47934 (diff)
downloadalacritty-a3d00f01b136ce95613bb20db9e05bfe9342185b.tar.gz
alacritty-a3d00f01b136ce95613bb20db9e05bfe9342185b.zip
Fixes for vttest cursor movement screen 1
Diffstat (limited to 'src/ansi.rs')
-rw-r--r--src/ansi.rs16
1 files changed, 14 insertions, 2 deletions
diff --git a/src/ansi.rs b/src/ansi.rs
index df445031..2b71e537 100644
--- a/src/ansi.rs
+++ b/src/ansi.rs
@@ -253,6 +253,9 @@ pub trait Handler {
/// Set an indexed color value
fn set_color(&mut self, usize, Rgb) {}
+
+ /// Run the dectest routine
+ fn dectest(&mut self) {}
}
/// Terminal modes
@@ -902,14 +905,23 @@ impl<'a, H, W> vte::Perform for Performer<'a, H, W>
match byte {
b'B' => configure_charset!(StandardCharset::Ascii),
b'D' => self.handler.linefeed(),
- b'E' => self.handler.newline(),
+ b'E' => {
+ self.handler.linefeed();
+ self.handler.carriage_return();
+ }
b'H' => self.handler.set_horizontal_tabstop(),
b'M' => self.handler.reverse_index(),
b'Z' => self.handler.identify_terminal(self.writer),
b'c' => self.handler.reset_state(),
b'0' => configure_charset!(StandardCharset::SpecialCharacterAndLineDrawing),
b'7' => self.handler.save_cursor_position(),
- b'8' => self.handler.restore_cursor_position(),
+ b'8' => {
+ if !intermediates.is_empty() && intermediates[0] == b'#' {
+ self.handler.dectest();
+ } else {
+ self.handler.restore_cursor_position();
+ }
+ }
b'=' => self.handler.set_keypad_application_mode(),
b'>' => self.handler.unset_keypad_application_mode(),
b'\\' => (), // String terminator, do nothing (parser handles as string terminator)