small software-rendered rust tty
Diffstat (limited to 'src/term.rs')
| -rw-r--r-- | src/term.rs | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/src/term.rs b/src/term.rs index f713d40..d34670d 100644 --- a/src/term.rs +++ b/src/term.rs @@ -1,5 +1,4 @@ use std::ops::Not; -use std::os::fd::BorrowedFd; mod cells; use cells::*; use ctlfun::Parameter::*; @@ -80,7 +79,11 @@ impl Terminal { self.cells.cells().fill(DCELL); } #[implicit_fn::implicit_fn] - pub fn rx(&mut self, x: u8, pty: BorrowedFd<'_>) { + pub fn rx( + &mut self, + x: u8, + #[cfg(target_family = "unix")] pty: std::os::fd::BorrowedFd<'_>, + ) { match self.p.parse_byte(x) { Continue => {} Char(x) => { @@ -266,6 +269,7 @@ impl Terminal { end: b'n', .. }) => { + #[cfg(target_family = "unix")] super::write( pty, format!("\x1b[{};{}R", self.cursor.1, self.cursor.0) |