(&mut self, text: &str)
| 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> { |
no test coverage detected