From ca6562dd14a2bead671598304ebcc65d2a1b2b85 Mon Sep 17 00:00:00 2001 From: ZeKai Weng Date: Thu, 8 Aug 2024 10:43:32 +0800 Subject: [PATCH] Fix non dirty decorator nodes don't get updated --- Lexical/Core/Reconciler.swift | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/Lexical/Core/Reconciler.swift b/Lexical/Core/Reconciler.swift index fc75def9..1674880e 100644 --- a/Lexical/Core/Reconciler.swift +++ b/Lexical/Core/Reconciler.swift @@ -169,8 +169,12 @@ internal enum Reconciler { if let cacheItem = editor.decoratorCache[key], let view = cacheItem.view { editor.decoratorCache[key] = DecoratorCacheItem.needsDecorating(view) } - guard let rangeCacheItem = reconcilerState.nextRangeCache[key] else { return } - textStorage.decoratorPositionCache[key] = rangeCacheItem.location + } + + for key in textStorage.decoratorPositionCache.keys { + if let rangeCacheItem = reconcilerState.nextRangeCache[key] { + textStorage.decoratorPositionCache[key] = rangeCacheItem.location + } } editor.log(.reconciler, .verbose, "about to do rangesToAdd: total \(reconcilerState.rangesToAdd.count)")