FXMisc / RichTextFX

Rich-text area for JavaFX
BSD 2-Clause "Simplified" License
1.21k stars 236 forks source link

bug report: Chosen line highlighter color isn't used when there is only 1 line. #1126

Open QazCetelic opened 2 years ago

QazCetelic commented 2 years ago

Expected Behavior

The chosen color (hsb(0, 0, 1, 0.1)) should be used.

Actual Behavior

The default color (yellow) is used.

Demo

1th line, 3 lines total. image

1th line, 1 lines total. image

Environment info:

QazCetelic commented 2 years ago

I found a workaround.

This triggers the bug.

codeArea.setLineHighlighterOn(true);
codeArea.setLineHighlighterFill(Color.hsb(0, 0, 1, 0.1));

This works fine.

codeArea.setLineHighlighterFill(Color.hsb(0, 0, 1, 0.1));
codeArea.setLineHighlighterOn(true);