Skip to content

Commit 7be08d1

Browse files
authored
Follow caret fix (#945)
1 parent 10849d9 commit 7be08d1

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1729,7 +1729,7 @@ public void dispose() {
17291729
private void followCaret() {
17301730
int parIdx = getCurrentParagraph();
17311731
Cell<Paragraph<PS, SEG, S>, ParagraphBox<PS, SEG, S>> cell = virtualFlow.getCell(parIdx);
1732-
Bounds caretBounds = cell.getNode().getCaretBounds(caretSelectionBind.getUnderlyingCaret());
1732+
Bounds caretBounds = caretSelectionBind.getUnderlyingCaret().getLayoutBounds();
17331733
double graphicWidth = cell.getNode().getGraphicPrefWidth();
17341734
Bounds region = extendLeft(caretBounds, graphicWidth);
17351735
double scrollX = virtualFlow.getEstimatedScrollX();

0 commit comments

Comments
 (0)