improv(text_input): optimize, fix, and improve the text inputs

This commit is contained in:
Michael Aaron Murphy 2025-03-19 16:43:43 +01:00
parent 92b2756e26
commit c538d672df
No known key found for this signature in database
GPG key ID: B2732D4240C9212C
4 changed files with 291 additions and 209 deletions

View file

@ -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()
}