Skip to content

Commit

Permalink
Move the hack
Browse files Browse the repository at this point in the history
  • Loading branch information
DJMcNab committed Nov 28, 2024
1 parent e5c0752 commit 13e913d
Showing 1 changed file with 1 addition and 5 deletions.
6 changes: 1 addition & 5 deletions masonry/src/widget/text_area.rs
Original file line number Diff line number Diff line change
Expand Up @@ -129,12 +129,8 @@ impl<const EDITABLE: bool> TextArea<EDITABLE> {
///
// This is written out fully to appease rust-analyzer; StyleProperty is imported but not recognised.
/// To change the font size, use `with_style`, setting [`StyleProperty::FontSize`](parley::StyleProperty::FontSize).
pub fn new(mut text: &str) -> Self {
pub fn new(text: &str) -> Self {
let mut editor = PlainEditor::new(theme::TEXT_SIZE_NORMAL);
// // HACK: Parley crashes if the *initial* text is empty; any subsequent version seems to be fine.
// if text.is_empty() {
// text = " ";
// }
editor.set_text(text);
TextArea {
editor,
Expand Down

0 comments on commit 13e913d

Please sign in to comment.