Skip to content

Commit

Permalink
Fix async demo syntax highlighting after file load (#1045)
Browse files Browse the repository at this point in the history
  • Loading branch information
Jugen authored Oct 22, 2021
1 parent 4f59454 commit 31acbf1
Showing 1 changed file with 1 addition and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -93,6 +93,7 @@ public void start(Stage primaryStage) {
codeArea.setParagraphGraphicFactory(LineNumberFactory.get(codeArea));
Subscription cleanupWhenDone = codeArea.multiPlainChanges()
.successionEnds(Duration.ofMillis(500))
.retainLatestUntilLater(executor)
.supplyTask(this::computeHighlightingAsync)
.awaitLatest(codeArea.multiPlainChanges())
.filterMap(t -> {
Expand Down

0 comments on commit 31acbf1

Please sign in to comment.