From 356186cf0f616fd2a89af7a72ab84a7741898fc2 Mon Sep 17 00:00:00 2001 From: 1024jp <1024jp@wolfrosch.com> Date: Wed, 3 Jul 2024 00:23:24 +0900 Subject: [PATCH] Change timing to apply editor sesttings to the textStorage --- CotEditor/Sources/Document.swift | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/CotEditor/Sources/Document.swift b/CotEditor/Sources/Document.swift index fe8708642..7732497a9 100644 --- a/CotEditor/Sources/Document.swift +++ b/CotEditor/Sources/Document.swift @@ -322,7 +322,6 @@ extension Document: EditorSource { // do nothing if already no textView exists guard !selection.isEmpty else { return } - self.applyContentToWindow() self.textStorage.restoreEditorSelection(selection) } @@ -412,6 +411,8 @@ extension Document: EditorSource { self.setSyntax(name: syntaxName ?? SyntaxName.none, isInitial: true) } self.isInitialized = true + + self.viewController?.invalidateStyleInTextStorage() } } @@ -1079,7 +1080,6 @@ extension Document: EditorSource { guard let viewController = self.viewController else { return } // update view - viewController.invalidateStyleInTextStorage() if self.isVerticalText { viewController.verticalLayoutOrientation = true }