Unnamed repository; edit this file 'description' to name the repository.
Diffstat (limited to 'helix-tui/src/backend/test.rs')
| -rw-r--r-- | helix-tui/src/backend/test.rs | 27 |
1 files changed, 5 insertions, 22 deletions
diff --git a/helix-tui/src/backend/test.rs b/helix-tui/src/backend/test.rs index b048cefc..db6be26d 100644 --- a/helix-tui/src/backend/test.rs +++ b/helix-tui/src/backend/test.rs @@ -1,10 +1,9 @@ use crate::{ backend::Backend, buffer::{Buffer, Cell}, - terminal::Config, }; use helix_core::unicode::width::UnicodeWidthStr; -use helix_view::graphics::{CursorKind, Rect}; +use helix_graphics::{CursorKind, Rect}; use std::{fmt::Write, io}; /// A backend used for the integration tests. @@ -107,18 +106,6 @@ impl TestBackend { } impl Backend for TestBackend { - fn claim(&mut self) -> Result<(), io::Error> { - Ok(()) - } - - fn reconfigure(&mut self, _config: Config) -> Result<(), io::Error> { - Ok(()) - } - - fn restore(&mut self) -> Result<(), io::Error> { - Ok(()) - } - fn draw<'a, I>(&mut self, content: I) -> Result<(), io::Error> where I: Iterator<Item = (u16, u16, &'a Cell)>, @@ -139,6 +126,10 @@ impl Backend for TestBackend { Ok(()) } + fn get_cursor(&mut self) -> Result<(u16, u16), io::Error> { + Ok(self.pos) + } + fn set_cursor(&mut self, x: u16, y: u16) -> Result<(), io::Error> { self.pos = (x, y); Ok(()) @@ -156,12 +147,4 @@ impl Backend for TestBackend { fn flush(&mut self) -> Result<(), io::Error> { Ok(()) } - - fn supports_true_color(&self) -> bool { - false - } - - fn get_theme_mode(&self) -> Option<helix_view::theme::Mode> { - None - } } |