MCPcopy Create free account
hub / github.com/GCWing/BitFun / set_text

Method set_text

src/apps/cli/src/ui/text_input.rs:191–195  ·  view source on GitHub ↗
(&mut self, text: &str)

Source from the content-addressed store, hash-verified

189 }
190
191 pub fn set_text(&mut self, text: &str) {
192 self.input = text.to_string();
193 self.cursor = self.input.chars().count();
194 self.scroll_offset = 0;
195 }
196
197 /// Take input text and reset state. Returns None if input is blank.
198 pub fn take_input(&mut self) -> Option<String> {

Callers 6

set_inputMethod · 0.80
set_inputMethod · 0.80
history_prevMethod · 0.80
history_nextMethod · 0.80
runMethod · 0.80
handle_non_key_eventMethod · 0.80

Calls 1

countMethod · 0.45

Tested by

no test coverage detected