aboutsummaryrefslogtreecommitdiff
path: root/src/ansi.rs
diff options
context:
space:
mode:
authorJoe Wilm <joe@jwilm.com>2016-12-16 22:48:04 -0800
committerJoe Wilm <joe@jwilm.com>2016-12-16 22:48:04 -0800
commitbde4dacc791501440515c1a51ad2fcb0256cf04c (patch)
tree66bd6762c4ae11705d1a82ed72112a408e5ec2d5 /src/ansi.rs
parent781572096ea67516a98872b1b3c5b1ffaea9bae0 (diff)
downloadalacritty-bde4dacc791501440515c1a51ad2fcb0256cf04c.tar.gz
alacritty-bde4dacc791501440515c1a51ad2fcb0256cf04c.zip
Misc formatting fixes
Diffstat (limited to 'src/ansi.rs')
-rw-r--r--src/ansi.rs49
1 files changed, 30 insertions, 19 deletions
diff --git a/src/ansi.rs b/src/ansi.rs
index 1848b9ca..633a7e54 100644
--- a/src/ansi.rs
+++ b/src/ansi.rs
@@ -176,13 +176,14 @@ pub trait Handler {
/// Erase `count` chars in current line following cursor
///
- /// Erase means resetting to the default state (default colors, no content, no mode flags)
+ /// Erase means resetting to the default state (default colors, no content,
+ /// no mode flags)
fn erase_chars(&mut self, Column) {}
/// Delete `count` chars
///
- /// Deleting a character is like the delete key on the keyboard - everything to the right of the
- /// deleted things is shifted left.
+ /// Deleting a character is like the delete key on the keyboard - everything
+ /// to the right of the deleted things is shifted left.
fn delete_chars(&mut self, Column) {}
/// Move backward `count` tabs
@@ -211,8 +212,9 @@ pub trait Handler {
/// Reverse Index
///
- /// Move the active position to the same horizontal position on the preceding line. If the
- /// active position is at the top margin, a scroll down is performed
+ /// Move the active position to the same horizontal position on the
+ /// preceding line. If the active position is at the top margin, a scroll
+ /// down is performed
fn reverse_index(&mut self) {}
/// set a terminal attribute
@@ -690,7 +692,13 @@ impl<'a, H, W> vte::Perform for Performer<'a, H, W>
}
#[inline]
- fn esc_dispatch(&mut self, params: &[i64], intermediates: &[u8], _ignore: bool, byte: u8) {
+ fn esc_dispatch(
+ &mut self,
+ params: &[i64],
+ intermediates: &[u8],
+ _ignore: bool,
+ byte: u8
+ ) {
match byte {
b'D' => self.handler.linefeed(),
b'E' => self.handler.newline(),
@@ -998,19 +1006,22 @@ mod tests {
#[test]
fn parse_zsh_startup() {
static BYTES: &'static [u8] = &[
- 0x1b, 0x5b, 0x31, 0x6d, 0x1b, 0x5b, 0x37, 0x6d, 0x25, 0x1b, 0x5b, 0x32, 0x37, 0x6d,
- 0x1b, 0x5b, 0x31, 0x6d, 0x1b, 0x5b, 0x30, 0x6d, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20,
- 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20,
- 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20,
- 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20,
- 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20,
- 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20,
- 0x20, 0x20, 0x20, 0x0d, 0x20, 0x0d, 0x0d, 0x1b, 0x5b, 0x30, 0x6d, 0x1b, 0x5b, 0x32,
- 0x37, 0x6d, 0x1b, 0x5b, 0x32, 0x34, 0x6d, 0x1b, 0x5b, 0x4a, 0x6a, 0x77, 0x69, 0x6c,
- 0x6d, 0x40, 0x6a, 0x77, 0x69, 0x6c, 0x6d, 0x2d, 0x64, 0x65, 0x73, 0x6b, 0x20, 0x1b,
- 0x5b, 0x30, 0x31, 0x3b, 0x33, 0x32, 0x6d, 0xe2, 0x9e, 0x9c, 0x20, 0x1b, 0x5b, 0x30,
- 0x31, 0x3b, 0x33, 0x32, 0x6d, 0x20, 0x1b, 0x5b, 0x33, 0x36, 0x6d, 0x7e, 0x2f, 0x63,
- 0x6f, 0x64, 0x65
+ 0x1b, 0x5b, 0x31, 0x6d, 0x1b, 0x5b, 0x37, 0x6d, 0x25, 0x1b, 0x5b,
+ 0x32, 0x37, 0x6d, 0x1b, 0x5b, 0x31, 0x6d, 0x1b, 0x5b, 0x30, 0x6d,
+ 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20,
+ 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20,
+ 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20,
+ 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20,
+ 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20,
+ 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20,
+ 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20,
+ 0x20, 0x20, 0x0d, 0x20, 0x0d, 0x0d, 0x1b, 0x5b, 0x30, 0x6d, 0x1b,
+ 0x5b, 0x32, 0x37, 0x6d, 0x1b, 0x5b, 0x32, 0x34, 0x6d, 0x1b, 0x5b,
+ 0x4a, 0x6a, 0x77, 0x69, 0x6c, 0x6d, 0x40, 0x6a, 0x77, 0x69, 0x6c,
+ 0x6d, 0x2d, 0x64, 0x65, 0x73, 0x6b, 0x20, 0x1b, 0x5b, 0x30, 0x31,
+ 0x3b, 0x33, 0x32, 0x6d, 0xe2, 0x9e, 0x9c, 0x20, 0x1b, 0x5b, 0x30,
+ 0x31, 0x3b, 0x33, 0x32, 0x6d, 0x20, 0x1b, 0x5b, 0x33, 0x36, 0x6d,
+ 0x7e, 0x2f, 0x63, 0x6f, 0x64, 0x65
];
let mut handler = AttrHandler::default();