With version 0.7M5, if I call setParagraphStyle, I get an exception saying that it's invalid to have a (rich text) change which doesn't add or remove text. This seems like a bug given that setParagraphStyle does exactly that, and in general it should be valid to have a rich text change which only changes styles. Stack trace:
java.lang.IllegalStateException: Cannot get the type of a change that neither inserts nor deletes anything.
at org.fxmisc.richtext.model.TextChange.<init>(TextChange.java:31)
at org.fxmisc.richtext.model.RichTextChange.<init>(RichTextChange.java:6)
at org.fxmisc.richtext.model.ReadOnlyStyledDocument.lambda$null$7(ReadOnlyStyledDocument.java:274)
at org.reactfx.util.Tuple2.map(Tuple2.java:31)
at org.fxmisc.richtext.model.ReadOnlyStyledDocument.lambda$replace$8(ReadOnlyStyledDocument.java:271)
at org.reactfx.util.Tuple2.map(Tuple2.java:31)
at org.fxmisc.richtext.model.ReadOnlyStyledDocument.replace(ReadOnlyStyledDocument.java:270)
at org.fxmisc.richtext.model.ReadOnlyStyledDocument.replaceParagraph(ReadOnlyStyledDocument.java:285)
at org.fxmisc.richtext.model.GenericEditableStyledDocumentBase.setParagraphStyle(GenericEditableStyledDocumentBase.java:179)
at org.fxmisc.richtext.model.SimpleEditableStyledDocument.setParagraphStyle(SimpleEditableStyledDocument.java:7)
With version 0.7M5, if I call setParagraphStyle, I get an exception saying that it's invalid to have a (rich text) change which doesn't add or remove text. This seems like a bug given that setParagraphStyle does exactly that, and in general it should be valid to have a rich text change which only changes styles. Stack trace: