-
Notifications
You must be signed in to change notification settings - Fork 108
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
De-traitify text module #515
base: main
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I agree with this change. Not approving as PR is draft
@@ -675,27 +616,43 @@ impl<Str: Deref<Target = str> + TextStorage> Selectable for Str { | |||
} | |||
} | |||
|
|||
/// A cursor type that implements `EditableTextCursor` for string types | |||
/// A cursor type with helper methods for working with strings. | |||
#[derive(Debug)] | |||
pub struct StringCursor<'a> { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why is this still pub
? It has no public API except for construction.
/// Move cursor to previous codepoint boundary, if it exists. | ||
/// Returns previous codepoint as usize offset. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
/// Move cursor to previous codepoint boundary, if it exists. | |
/// Returns previous codepoint as usize offset. | |
/// Move cursor to previous codepoint boundary, if it exists. | |
/// Returns previous codepoint as usize offset, or `None` if this cursor was already at the first boundary. |
// TODO: This is *definitely* empty | ||
#[cfg(FALSE)] | ||
if !self.text_layout.text().links().is_empty() { | ||
tracing::warn!("Links present in text, but not yet integrated"); | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
// TODO: This is *definitely* empty | |
#[cfg(FALSE)] | |
if !self.text_layout.text().links().is_empty() { | |
tracing::warn!("Links present in text, but not yet integrated"); | |
} | |
// When we add links to `Prose`, they will probably need to be handled here. |
#[cfg(FALSE)] | ||
if !self.text_layout.text().links().is_empty() { | ||
tracing::warn!("Links present in text, but not yet integrated"); | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
#[cfg(FALSE)] | |
if !self.text_layout.text().links().is_empty() { | |
tracing::warn!("Links present in text, but not yet integrated"); | |
} |
Label
will never support links
722c639
to
d35bd2e
Compare
No description provided.