We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
I encountered some incorrect behavior of GenericStyledArea.getStyleRangeAtPosition(int position) in version 0.8.*
Here goes the detail:
InlineCssTextArea area = new InlineCssTextArea(); area.appendText("1234567890"); area.setStyle(5, 7, "-fx-fill:red;"); System.out.println(area.getStyleRangeAtPosition(6)); //expect '5,7' but print '0,5' System.out.println(area.getStyleRangeAtPosition(8)); //expect '7,10' but print '0,5'
If I switch to version 0.7-M5, the result meets my expectation, which is '5,7' and '7,10'. But with 0.8.0, 0.8.1 or 0.8.2, the result is wrong.
The text was updated successfully, but these errors were encountered:
Just a quick guess, but I think the wrong TwoPosition.Bias value is being used somewhere (e.g. BACKWARDS instead of FORWARDS).
TwoPosition.Bias
BACKWARDS
FORWARDS
I'll have to look into it more later on.
Sorry, something went wrong.
getStyleRangeAtPosition()
Turns out the paragraph list's navigator, not the style spans' navigator, is being used to calculate the position within the StyleSpans object.
StyleSpans
Thanks for reporting that!
I've released a new snapshot that includes the fix for you.
No branches or pull requests
I encountered some incorrect behavior of GenericStyledArea.getStyleRangeAtPosition(int position) in version 0.8.*
Here goes the detail:
If I switch to version 0.7-M5, the result meets my expectation, which is '5,7' and '7,10'. But with 0.8.0, 0.8.1 or 0.8.2, the result is wrong.
The text was updated successfully, but these errors were encountered: