We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 15965d1 commit cd55c59Copy full SHA for cd55c59
1 file changed
richtextfx/src/main/java/org/fxmisc/richtext/GenericStyledArea.java
@@ -978,7 +978,7 @@ public final int visibleParToAllParIndex(int visibleParIndex) {
978
if (visibleParIndex < 0) {
979
throw new IllegalArgumentException("Visible paragraph index cannot be negative but was " + visibleParIndex);
980
}
981
- if (visibleParIndex >= getVisibleParagraphs().size()) {
+ if (visibleParIndex > 0 && visibleParIndex >= getVisibleParagraphs().size()) {
982
throw new IllegalArgumentException(String.format(
983
"Visible paragraphs' last index is [%s] but visibleParIndex was [%s]",
984
getVisibleParagraphs().size() - 1, visibleParIndex)
0 commit comments