Cleanup Paragraph class after having covered it with UT#1311
Open
Symeon94 wants to merge 8 commits intoFXMisc:masterfrom
Open
Cleanup Paragraph class after having covered it with UT#1311Symeon94 wants to merge 8 commits intoFXMisc:masterfrom
Paragraph class after having covered it with UT#1311Symeon94 wants to merge 8 commits intoFXMisc:masterfrom
Conversation
Symeon94
commented
Dec 29, 2025
| } | ||
| return new Paragraph<>(paragraphStyle, segmentOps, segs, styles.subView(0, length)); | ||
| public Paragraph<PS, SEG, S> trim(int end) { | ||
| end = Math.max(0, end); |
Collaborator
Author
There was a problem hiding this comment.
This is a behaviour change (you can see the adaptation in the test for it), any trim with negative number should equal to trimming with 0 (it was already the case for some negative values, but not all).
Symeon94
commented
Dec 29, 2025
|
|
||
| // Restyle up to the end | ||
| // Bug | ||
| checkStyle(p3.restyle(11, 18, "out"), 18, |
Collaborator
Author
There was a problem hiding this comment.
I thought the bug was with out-of-bound indexes, but it is actually a bug when you go up to the length. I created #1310 to handle that one.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
As per title. Tests were previously added and merged and this branch is used to clean it up.
Note that I did change a little behaviour here, the trim method is now capping the end value to not allow negative number.