Skip to content

Commit 390848e

Browse files
committed
fix selection painting of empty lines if text area displays line numbers
1 parent cd7a966 commit 390848e

1 file changed

Lines changed: 1 addition & 1 deletion

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
@@ -270,7 +270,7 @@ private PathElement[] getRangeShapeSafely(int start, int end) {
270270
// Selection includes a newline character.
271271
if (paragraph.length() == 0) {
272272
// empty paragraph
273-
shape = createRectangle(getLayoutX(), getLayoutY(), getWidth(), getHeight());
273+
shape = createRectangle(0, 0, getWidth(), getHeight());
274274
} else if (start == paragraph.length()) {
275275
// selecting only the newline char
276276

0 commit comments

Comments
 (0)