From 979b35a4b06f640f34a7c43af673db1f54de6bf4 Mon Sep 17 00:00:00 2001 From: Khan Winter <35942988+thecoolwinter@users.noreply.github.com> Date: Wed, 8 Jan 2025 13:02:23 -0600 Subject: [PATCH] Always Show Highlights After Application --- Sources/CodeEditSourceEditor/Highlighting/Highlighter.swift | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Sources/CodeEditSourceEditor/Highlighting/Highlighter.swift b/Sources/CodeEditSourceEditor/Highlighting/Highlighter.swift index c223378c7..fd1ac5e76 100644 --- a/Sources/CodeEditSourceEditor/Highlighting/Highlighter.swift +++ b/Sources/CodeEditSourceEditor/Highlighting/Highlighter.swift @@ -201,7 +201,7 @@ extension Highlighter: NSTextStorageDelegate { extension Highlighter: StyledRangeContainerDelegate { func styleContainerDidUpdate(in range: NSRange) { guard let textView, let attributeProvider else { return } -// textView.layoutManager.beginTransaction() + textView.layoutManager.beginTransaction() textView.textStorage.beginEditing() let storage = textView.textStorage @@ -216,8 +216,8 @@ extension Highlighter: StyledRangeContainerDelegate { } textView.textStorage.endEditing() -// textView.layoutManager.endTransaction() -// textView.layoutManager.invalidateLayoutForRange(range) + textView.layoutManager.endTransaction() + textView.layoutManager.invalidateLayoutForRange(range) } }