Skip to content

paragraph.getSegments() duplicates. #65

@ghost

Description

Hi Tomas, I think I may have found a bug.

I type in a text area, something: "TESTING".

Then I get list of paragraphs, in this case its only one paragraph.,

segmentList = textArea.getDocument().getParagraphs().get(0).getSegments();
then I iterate over segments from this one paragraph

for (StyledText segment : segmentList) {
        System.out.println("Start at " + styleStart + " and ending at: " + segment.length() + "for segment: " + segment.toString() + " with style" + segment.getStyle());
    }

I get 4 print statements..

Start at 0 and ending at: 7for segment: TESTING with style-fx-font-family:Arial;-fx-font-size:16;-fx-font-weight:normal;-fx-fill:rgb(0,0,0);-fx-font-style:normal;-fx-underline:false;
Start at 0 and ending at: 7for segment: TESTING with style-fx-font-family:Arial;-fx-font-size:16;-fx-font-weight:normal;-fx-fill:rgb(0,0,0);-fx-font-style:normal;-fx-underline:false;
Start at 0 and ending at: 7for segment: TESTING with style-fx-font-family:Arial;-fx-font-size:16;-fx-font-weight:normal;-fx-fill:rgb(0,0,0);-fx-font-style:normal;-fx-underline:false;
Start at 0 and ending at: 7for segment: TESTING with style-fx-font-family:Arial;-fx-font-size:16;-fx-font-weight:normal;-fx-fill:rgb(0,0,0);-fx-font-style:normal;-fx-underline:false;

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions