Introduce instruction::Target in test crate

This commit is contained in:
Héctor Ramón Jiménez 2025-08-20 13:47:34 +02:00
parent f9755b0b7a
commit bdcaadbe00
No known key found for this signature in database
GPG key ID: 7CC46565708259A7
8 changed files with 150 additions and 82 deletions

View file

@ -1631,6 +1631,14 @@ impl<P: text::Paragraph> operation::Focusable for State<P> {
}
impl<P: text::Paragraph> operation::TextInput for State<P> {
fn text(&self) -> &str {
if self.value.content().is_empty() {
self.placeholder.content()
} else {
self.value.content()
}
}
fn move_cursor_to_front(&mut self) {
State::move_cursor_to_front(self);
}