(&mut self)
| 117 | } |
| 118 | |
| 119 | fn leave_alt(&mut self) -> io::Result<()> { |
| 120 | let alt_backup = match self.alt_backup.take() { |
| 121 | Some(t) => t, |
| 122 | None => { |
| 123 | return Err(io::Error::new( |
| 124 | io::ErrorKind::InvalidInput, |
| 125 | "Cannot leave alternate screen; not entered", |
| 126 | )); |
| 127 | } |
| 128 | }; |
| 129 | |
| 130 | self.call(Request::LeaveAlt)?; |
| 131 | |
| 132 | (self.fg_color, self.bg_color) = alt_backup; |
| 133 | Ok(()) |
| 134 | } |
| 135 | |
| 136 | fn locate(&mut self, pos: CharsXY) -> io::Result<()> { |
| 137 | self.call(Request::Locate(pos)) |