We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent f630e82 commit 3c9578fCopy full SHA for 3c9578f
1 file changed
richtextfx/src/main/java/org/fxmisc/richtext/GenericStyledArea.java
@@ -1236,7 +1236,7 @@ public void setLineHighlighterOn( boolean show )
1236
path.getElements().addListener( (Change<? extends PathElement> chg) ->
1237
{
1238
if ( chg.next() && chg.wasAdded() || chg.wasReplaced() ) {
1239
- double width = getLayoutBounds().getWidth();
+ double width = path.getParent().getLayoutBounds().getWidth();
1240
// The path is limited to the bounds of the text, so here it's altered to the area's width
1241
chg.getAddedSubList().stream().skip(1).limit(2).forEach( ele -> ((LineTo) ele).setX( width ) );
1242
// The path can wrap onto another line if enough text is inserted, so here it's trimmed
0 commit comments