Skip to content
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

Added getStyleRange to StyleSpans #1232

Merged
merged 1 commit into from
Jun 12, 2024
Merged

Conversation

Jugen
Copy link
Collaborator

@Jugen Jugen commented May 29, 2024

Resolves #1231 How to get real size of one span at position X

With this PR a developer can now get the range of a style that crosses paragraphs.
Both the requested position and the returned IndexRange are relative to the start of the requested StyleSpans.

Usage Example:

var ss = codeArea.getStyleSpans( 0, codeArea.getLength() );  // From beginning to end
var range = ss.getStyleRange( position );  // So range is from beginning

@Jugen Jugen merged commit 754bea2 into master Jun 12, 2024
@Jugen Jugen deleted the add-getStyleRange-to-StyleSpans branch June 12, 2024 07:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Question: how to get real size of one span at position X?
1 participant