MCPcopy Index your code
hub / github.com/endbasic/endbasic / enter_alt

Method enter_alt

std/src/console/graphics.rs:553–572  ·  view source on GitHub ↗
(&mut self)

Source from the content-addressed store, hash-verified

551 }
552
553 fn enter_alt(&mut self) -> io::Result<()> {
554 if self.alt_backup.is_some() {
555 return Err(io::Error::new(
556 io::ErrorKind::InvalidInput,
557 "Cannot nest alternate screens",
558 ));
559 }
560
561 let pixels = self.raster_ops.read_pixels(PixelsXY::new(0, 0), self.size_pixels)?;
562 self.alt_backup = Some((
563 pixels,
564 self.cursor_pos,
565 self.ansi_fg_color,
566 self.ansi_bg_color,
567 self.fg_color,
568 self.bg_color,
569 ));
570
571 self.clear(ClearType::All)
572 }
573
574 fn hide_cursor(&mut self) -> io::Result<()> {
575 self.clear_cursor()?;

Callers

nothing calls this directly

Calls 2

read_pixelsMethod · 0.45
clearMethod · 0.45

Tested by

no test coverage detected