Skip to content

Commit 4e92a2c

Browse files
author
Symeon94
committed
Removing getCaretShape, we don't need it in the end.
1 parent 8dfc050 commit 4e92a2c

2 files changed

Lines changed: 1 addition & 11 deletions

File tree

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -328,7 +328,7 @@ private void updateAllCaretShapes() {
328328
}
329329

330330
private void updateSingleCaret(CaretNode caretNode) {
331-
PathElement[] shape = getLeadingCaretShape(getClampedCaretPosition(caretNode));
331+
PathElement[] shape = caretShape(getClampedCaretPosition(caretNode), true);
332332
caretNode.getElements().setAll(shape);
333333
}
334334

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

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -52,16 +52,6 @@ int getLineOfCharacter(int charIdx) {
5252
return navigator.offsetToPosition(charIdx, Forward).getMajor();
5353
}
5454

55-
/**
56-
* The name of this method was changed from {@code getCaretShape} to {@code getLeadingCaretShape} because
57-
* of the introduction in {@link TextFlow} of a method with the same name in JavaFX 25+.
58-
* To make this method unique, the {@code isLeading} argument has been removed. If you need to use it, refer
59-
* to the {@link TextFlow} class with the original method.
60-
*/
61-
PathElement[] getLeadingCaretShape(int charIdx) {
62-
return caretShape(charIdx, true);
63-
}
64-
6555
PathElement[] getRangeShape(IndexRange range) {
6656
return getRangeShape(range.getStart(), range.getEnd());
6757
}

0 commit comments

Comments
 (0)