We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent e19fdd6 commit 7a7df5bCopy full SHA for 7a7df5b
1 file changed
richtextfx-demos/src/main/java/org/fxmisc/richtext/demo/richtext/RichText.java
@@ -265,8 +265,9 @@ private void updateStyleInSelection(StyleInfo mixin) {
265
}
266
267
private void updateParagraphStyleInSelection(Function<StyleInfo, StyleInfo> updater) {
268
- Paragraph<StyleInfo, StyleInfo> paragraph = area.getParagraph(area.getCurrentParagraph());
269
- paragraph.setParagraphStyle(updater.apply(paragraph.getParagraphStyle()));
+ int parIdx = area.getCurrentParagraph();
+ Paragraph<StyleInfo, StyleInfo> paragraph = area.getParagraph(parIdx);
270
+ area.setParagraphStyle(parIdx, updater.apply(paragraph.getParagraphStyle()));
271
272
273
private void updateFontSize(Integer size) {
0 commit comments