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

Method render_line

std/src/console/readline.rs:66–74  ·  view source on GitHub ↗

Returns the text to render for the current viewport.

(&self, view_start: usize)

Source from the content-addressed store, hash-verified

64
65 /// Returns the text to render for the current viewport.
66 fn render_line(&self, view_start: usize) -> String {
67 debug_assert!(view_start <= self.line.len());
68
69 if !self.echo {
70 SECURE_CHAR.repeat((self.line.len() - view_start).min(self.input_width))
71 } else {
72 self.line.range(view_start, view_start + self.input_width)
73 }
74 }
75
76 /// Recomputes the rendered text and its display width.
77 fn sync_rendered(&mut self) {

Callers 1

sync_renderedMethod · 0.80

Calls 2

rangeMethod · 0.80
lenMethod · 0.45

Tested by

no test coverage detected