improv(text_input): optimize, fix, and improve the text inputs
This commit is contained in:
parent
92b2756e26
commit
c538d672df
4 changed files with 291 additions and 209 deletions
|
|
@ -10,11 +10,13 @@ pub struct Editor<'a> {
|
|||
}
|
||||
|
||||
impl<'a> Editor<'a> {
|
||||
#[inline]
|
||||
pub fn new(value: &'a mut Value, cursor: &'a mut Cursor) -> Editor<'a> {
|
||||
Editor { value, cursor }
|
||||
}
|
||||
|
||||
#[must_use]
|
||||
#[inline]
|
||||
pub fn contents(&self) -> String {
|
||||
self.value.to_string()
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue