aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJesse Luehrs <doy@tozt.net>2019-11-03 11:04:16 +0000
committerJesse Luehrs <doy@tozt.net>2019-11-03 11:04:16 +0000
commit31181841edec356c049fae56f78aa5ba1c086619 (patch)
tree262dfcdf177768c759a0895792a020193abdbb11
parentff65c812fcf3e46803bb3fbdc820d0006ea004c3 (diff)
downloadvt100-rust-31181841edec356c049fae56f78aa5ba1c086619.tar.gz
vt100-rust-31181841edec356c049fae56f78aa5ba1c086619.zip
fmt
-rw-r--r--src/lib.rs2
-rw-r--r--src/screen.rs6
-rw-r--r--tests/window_contents.rs10
3 files changed, 11 insertions, 7 deletions
diff --git a/src/lib.rs b/src/lib.rs
index 5e15deb..669fafd 100644
--- a/src/lib.rs
+++ b/src/lib.rs
@@ -10,6 +10,6 @@ mod row;
mod screen;
mod unicode;
-pub use cell::Cell;
pub use attrs::Color;
+pub use cell::Cell;
pub use screen::Screen;
diff --git a/src/screen.rs b/src/screen.rs
index 7ccc32f..ad37ad1 100644
--- a/src/screen.rs
+++ b/src/screen.rs
@@ -657,10 +657,8 @@ impl vte::Perform for State {
'h' => self.sm(canonicalize_params_multi(params)),
'l' => self.rm(canonicalize_params_multi(params)),
'm' => self.sgr(canonicalize_params_multi(params)),
- 'r' => self.csr(canonicalize_params_csr(
- params,
- self.grid().size(),
- )),
+ 'r' => self
+ .csr(canonicalize_params_csr(params, self.grid().size())),
_ => {
if log::log_enabled!(log::Level::Warn) {
log::warn!(
diff --git a/tests/window_contents.rs b/tests/window_contents.rs
index 057cfb1..91e73e3 100644
--- a/tests/window_contents.rs
+++ b/tests/window_contents.rs
@@ -1,14 +1,20 @@
#[test]
fn formatted() {
let mut screen = vt100::Screen::new(24, 80);
- assert_eq!(screen.window_contents_formatted(0, 0 ,23, 79), "\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n");
+ assert_eq!(
+ screen.window_contents_formatted(0, 0, 23, 79),
+ "\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n"
+ );
screen.process(b"foobar");
assert!(!screen.cell(0, 2).unwrap().bold());
assert!(!screen.cell(0, 3).unwrap().bold());
assert!(!screen.cell(0, 4).unwrap().bold());
assert!(!screen.cell(0, 5).unwrap().bold());
- assert_eq!(screen.window_contents_formatted(0, 0 ,23, 79), "foobar\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n");
+ assert_eq!(
+ screen.window_contents_formatted(0, 0, 23, 79),
+ "foobar\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n"
+ );
screen.process(b"\x1b[1;4H\x1b[1;7m\x1b[33mb");
assert!(!screen.cell(0, 2).unwrap().bold());