diff options
-rw-r--r-- | src/lib.rs | 2 | ||||
-rw-r--r-- | src/screen.rs | 6 | ||||
-rw-r--r-- | tests/window_contents.rs | 10 |
3 files changed, 11 insertions, 7 deletions
@@ -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()); |