Introduce instruction::Target in test crate
This commit is contained in:
parent
f9755b0b7a
commit
bdcaadbe00
8 changed files with 150 additions and 82 deletions
|
|
@ -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);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue