Skip to content

Commit f630e82

Browse files
authored
Follow caret show complete line fix (#947)
1 parent 7be08d1 commit f630e82

1 file changed

Lines changed: 10 additions & 0 deletions

File tree

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

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1750,6 +1750,16 @@ private void followCaret() {
17501750
}
17511751
}
17521752

1753+
// Addresses https://github.com/FXMisc/RichTextFX/issues/937#issuecomment-674319602
1754+
if ( parIdx == getParagraphs().size()-1 && cell.getNode().getLineCount() == 1 )
1755+
{
1756+
region = new BoundingBox // Correcting the region's height
1757+
(
1758+
region.getMinX(), region.getMinY(), region.getWidth(),
1759+
cell.getNode().getLayoutBounds().getHeight()
1760+
);
1761+
}
1762+
17531763
virtualFlow.show(parIdx, region);
17541764
}
17551765

0 commit comments

Comments
 (0)