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

Method move_within_line

std/src/console/graphics.rs:624–635  ·  view source on GitHub ↗
(&mut self, off: i16)

Source from the content-addressed store, hash-verified

622 }
623
624 fn move_within_line(&mut self, off: i16) -> io::Result<()> {
625 let previous = self.set_sync(false)?;
626 self.clear_cursor()?;
627 if off < 0 {
628 self.cursor_pos.x -= -off as u16;
629 } else {
630 self.cursor_pos.x += off as u16;
631 }
632 self.draw_cursor()?;
633 self.set_sync(previous)?;
634 Ok(())
635 }
636
637 fn print(&mut self, text: &str) -> io::Result<()> {
638 let text = remove_control_chars(text);

Callers

nothing calls this directly

Calls 3

clear_cursorMethod · 0.80
draw_cursorMethod · 0.80
set_syncMethod · 0.45

Tested by

no test coverage detected