Skip to content

Bug: allParToVisibleParIndex throws Exception when allParIndex is >= size of visible paragraphs but <= area's last paragraph index #758

@JordanMartinez

Description

@JordanMartinez

As originally reported here...

Expected Behavior

allParToVisibleParIndex(int allParIndex) should return Optional.of(correspondingVisibleParIndex) for all valid allParIndex arguments.

Actual Behavior

allParToVisibleParIndex(int allParIndex) throws an exception if allParIndex is within the bounds of the area's paragraph indices but less than the last visible paragraph index.

This can easily be fixed by checking the argument against the size of the area's total paragraphs rather than the visible ones.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions