Skip to content

Commit f466efa

Browse files
committed
Merge pull request #294 from JordanMartinez/minorFixes
Deprecate StyledTextArea#positionCaret
2 parents 5f1e08f + d54d825 commit f466efa

2 files changed

Lines changed: 10 additions & 0 deletions

File tree

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

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -989,6 +989,12 @@ public void selectRange(int anchor, int caretPosition) {
989989
model.selectRange(anchor, caretPosition);
990990
}
991991

992+
/**
993+
* {@inheritDoc}
994+
* @deprecated You probably meant to use {@link #moveTo(int)}. This method will be made
995+
* package-private in the future
996+
*/
997+
@Deprecated
992998
@Override
993999
public void positionCaret(int pos) {
9941000
model.positionCaret(pos);

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

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -191,6 +191,10 @@ default void replace(IndexRange range, StyledDocument<PS, S> replacement) {
191191
* the selection. Can be used to achieve the special case of positioning
192192
* the caret outside or inside the selection, as opposed to always being
193193
* at the boundary. Use with care.
194+
*
195+
* @deprecated You probably meant to use {@link NavigationActions#moveTo(int)}. This method will be made
196+
* package-private in the future
194197
*/
198+
@Deprecated
195199
public void positionCaret(int pos);
196200
}

0 commit comments

Comments
 (0)