RichTextFX icon indicating copy to clipboard operation
RichTextFX copied to clipboard

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

Open QazCetelic opened this issue 3 years ago • 1 comments

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:

  • RichTextFX Version: 0.10.9
  • Operating System: Linux
  • Java version: 17

QazCetelic avatar Jul 04 '22 13:07 QazCetelic

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);

QazCetelic avatar Jul 04 '22 13:07 QazCetelic