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

Method reset_view_to_end

std/src/console/readline.rs:83–87  ·  view source on GitHub ↗

Moves the viewport so that the end of the line is visible.

(&mut self)

Source from the content-addressed store, hash-verified

81
82 /// Moves the viewport so that the end of the line is visible.
83 fn reset_view_to_end(&mut self) {
84 self.view_start =
85 if self.input_width == 0 { 0 } else { self.pos.saturating_sub(self.input_width) };
86 self.sync_rendered();
87 }
88
89 /// Redraws the rendered viewport and places the cursor at the desired offset.
90 fn redraw_line(&mut self, old_pos: usize, clear_len: usize, new_pos: usize) -> io::Result<()> {

Callers 1

do_up_downMethod · 0.80

Calls 1

sync_renderedMethod · 0.80

Tested by

no test coverage detected