Skip to content

Commit

Permalink
gpui
Browse files Browse the repository at this point in the history
  • Loading branch information
osiewicz committed Feb 20, 2025
1 parent 8731454 commit 73004bd
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 8 deletions.
9 changes: 9 additions & 0 deletions crates/gpui/src/text_system.rs
Original file line number Diff line number Diff line change
Expand Up @@ -670,6 +670,15 @@ pub struct TextRun {
pub strikethrough: Option<StrikethroughStyle>,
}

#[cfg(all(target_os = "macos", test))]
impl TextRun {
fn with_len(&self, len: usize) -> Self {
let mut this = self.clone();
this.len = len;
this
}
}

/// An identifier for a specific glyph, as returned by [`TextSystem::layout_line`].
#[derive(Copy, Clone, Debug, Eq, PartialEq, Hash)]
#[repr(C)]
Expand Down
8 changes: 0 additions & 8 deletions crates/gpui/src/text_system/line_wrapper.rs
Original file line number Diff line number Diff line change
Expand Up @@ -543,14 +543,6 @@ mod tests {
background_color: None,
};

impl TextRun {
fn with_len(&self, len: usize) -> Self {
let mut this = self.clone();
this.len = len;
this
}
}

let text = "aa bbb cccc ddddd eeee".into();
let lines = text_system
.shape_text(
Expand Down

0 comments on commit 73004bd

Please sign in to comment.