diff --git a/src/Album/AlbOppositeDelimiterUpdater.class.st b/src/Album/AlbOppositeDelimiterUpdater.class.st index 7af80b5..98bf13e 100644 --- a/src/Album/AlbOppositeDelimiterUpdater.class.st +++ b/src/Album/AlbOppositeDelimiterUpdater.class.st @@ -108,10 +108,11 @@ AlbOppositeDelimiterUpdater >> subtextElementInvalidateEvent: anEvent [ { #category : #'opposite delimiter' } AlbOppositeDelimiterUpdater >> updateOppositeDelimiterIn: anEditorElement [ - oppositeDelim ifNotNil: [ - oppositeDelim removeFromParent. - oppositeDelim := nil ]. - anEditorElement selection ifNotEmpty: [ ^ self ]. - oppositeDelim := self createOppositeDelimiterIn: anEditorElement. - oppositeDelim ifNotNil: [ anEditorElement addChild: oppositeDelim] + anEditorElement enqueueTask: (BlTaskAction new action: [ + oppositeDelim ifNotNil: [ + oppositeDelim removeFromParent. + oppositeDelim := nil ]. + anEditorElement selection ifNotEmpty: [ ^ self ]. + oppositeDelim := self createOppositeDelimiterIn: anEditorElement. + oppositeDelim ifNotNil: [ anEditorElement addChild: oppositeDelim ] ]) ]