Skip to content

Added getStyleRange to StyleSpans#1232

Merged
Jugen merged 1 commit intomasterfrom
add-getStyleRange-to-StyleSpans
Jun 12, 2024
Merged

Added getStyleRange to StyleSpans#1232
Jugen merged 1 commit intomasterfrom
add-getStyleRange-to-StyleSpans

Conversation

@Jugen
Copy link
Copy Markdown
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