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

Method leave_alt

sdl/src/console.rs:119–134  ·  view source on GitHub ↗
(&mut self)

Source from the content-addressed store, hash-verified

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))

Callers 3

runFunction · 0.45

Calls 1

callMethod · 0.80

Tested by 2