From 31181841edec356c049fae56f78aa5ba1c086619 Mon Sep 17 00:00:00 2001 From: Jesse Luehrs Date: Sun, 3 Nov 2019 11:04:16 +0000 Subject: fmt --- src/lib.rs | 2 +- src/screen.rs | 6 ++---- tests/window_contents.rs | 10 ++++++++-- 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()); -- cgit v1.2.3-54-g00ecf