Skip to content

Commit

Permalink
Add Clone derives
Browse files Browse the repository at this point in the history
  • Loading branch information
nicoburns committed Jul 22, 2024
1 parent 1a76679 commit 67faee6
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 0 deletions.
1 change: 1 addition & 0 deletions parley/src/editor/edit.rs
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,7 @@ impl EditableText for String {
// }

/// A region of text which can support editing operations
#[derive(Clone)]
pub struct TextEditor<T: EditableText> {
inner: TextWithSelection<T>,
/// The range of the preedit region in the text
Expand Down
1 change: 1 addition & 0 deletions parley/src/editor/selection.rs
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ use super::masonry_types::{Handled, PointerButton, PointerState, TextEvent};

use super::{TextBrush, TextLayout, TextStorage};

#[derive(Clone)]
pub struct TextWithSelection<T: Selectable> {
pub layout: TextLayout<T>,
/// The current selection within this widget
Expand Down

0 comments on commit 67faee6

Please sign in to comment.