Skip to content

Commit

Permalink
Follow caret show complete line fix (#947)
Browse files Browse the repository at this point in the history
  • Loading branch information
Jugen authored Aug 17, 2020
1 parent 7be08d1 commit f630e82
Showing 1 changed file with 10 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -1750,6 +1750,16 @@ private void followCaret() {
}
}

// Addresses https://github.com/FXMisc/RichTextFX/issues/937#issuecomment-674319602
if ( parIdx == getParagraphs().size()-1 && cell.getNode().getLineCount() == 1 )
{
region = new BoundingBox // Correcting the region's height
(
region.getMinX(), region.getMinY(), region.getWidth(),
cell.getNode().getLayoutBounds().getHeight()
);
}

virtualFlow.show(parIdx, region);
}

Expand Down

0 comments on commit f630e82

Please sign in to comment.