Skip to content

Commit 2bd55ba

Browse files
authored
Skip paragraph graphic creation if index is -1 (#882)
1 parent 05112aa commit 2bd55ba

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

richtextfx/src/main/java/org/fxmisc/richtext/ParagraphBox.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -105,7 +105,7 @@ public final ObservableMap<Selection<PS, SEG, S>, SelectionPath> selectionsPrope
105105
graphic = Val.combine(
106106
graphicFactory,
107107
this.index,
108-
(f, i) -> f != null ? f.apply(i) : null);
108+
(f, i) -> f != null && i > -1 ? f.apply(i) : null);
109109
graphic.addListener((obs, oldG, newG) -> {
110110
if(oldG != null) {
111111
getChildren().remove(oldG);

0 commit comments

Comments
 (0)