Derive more traits for widgets
This commit is contained in:
parent
77e72de9ad
commit
007493f136
6 changed files with 10 additions and 1 deletions
|
|
@ -20,6 +20,7 @@ fn wrap(widthdb: &mut WidthDb, text: &str, width: usize) -> Vec<usize> {
|
|||
// State //
|
||||
///////////
|
||||
|
||||
#[derive(Debug, Clone)]
|
||||
pub struct EditorState {
|
||||
text: String,
|
||||
|
||||
|
|
@ -339,6 +340,7 @@ impl Default for EditorState {
|
|||
// Widget //
|
||||
////////////
|
||||
|
||||
#[derive(Debug)]
|
||||
pub struct Editor<'a> {
|
||||
state: &'a mut EditorState,
|
||||
highlighted: Styled,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue