MCPcopy Create free account
hub / github.com/ChrisFeldmeier/OpenCodeRust / insert_text

Method insert_text

crates/opencode-tui/src/components/prompt.rs:583–588  ·  view source on GitHub ↗
(&mut self, text: &str)

Source from the content-addressed store, hash-verified

581 }
582
583 pub fn insert_text(&mut self, text: &str) {
584 self.input.insert_str(self.cursor_position, text);
585 self.cursor_position = self.cursor_position.saturating_add(text.len());
586 self.reset_history_cursor();
587 self.recompute_suggestions();
588 }
589
590 pub fn desired_height(&self, width: u16) -> u16 {
591 self.input_display_lines(width)

Callers 2

handle_eventMethod · 0.80

Calls 2

reset_history_cursorMethod · 0.80
recompute_suggestionsMethod · 0.80

Tested by

no test coverage detected