Skip to content

Commit 31acbf1

Browse files
authored
Fix async demo syntax highlighting after file load (#1045)
1 parent 4f59454 commit 31acbf1

1 file changed

Lines changed: 1 addition & 0 deletions

File tree

richtextfx-demos/src/main/java/org/fxmisc/richtext/demo/JavaKeywordsAsyncDemo.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -93,6 +93,7 @@ public void start(Stage primaryStage) {
9393
codeArea.setParagraphGraphicFactory(LineNumberFactory.get(codeArea));
9494
Subscription cleanupWhenDone = codeArea.multiPlainChanges()
9595
.successionEnds(Duration.ofMillis(500))
96+
.retainLatestUntilLater(executor)
9697
.supplyTask(this::computeHighlightingAsync)
9798
.awaitLatest(codeArea.multiPlainChanges())
9899
.filterMap(t -> {

0 commit comments

Comments
 (0)