Skip to content

Commit 2810b76

Browse files
Always Show Highlights After Applying (#288)
1 parent 63bae5a commit 2810b76

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

Sources/CodeEditSourceEditor/Highlighting/Highlighter.swift

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -201,7 +201,7 @@ extension Highlighter: NSTextStorageDelegate {
201201
extension Highlighter: StyledRangeContainerDelegate {
202202
func styleContainerDidUpdate(in range: NSRange) {
203203
guard let textView, let attributeProvider else { return }
204-
// textView.layoutManager.beginTransaction()
204+
textView.layoutManager.beginTransaction()
205205
textView.textStorage.beginEditing()
206206

207207
let storage = textView.textStorage
@@ -216,8 +216,8 @@ extension Highlighter: StyledRangeContainerDelegate {
216216
}
217217

218218
textView.textStorage.endEditing()
219-
// textView.layoutManager.endTransaction()
220-
// textView.layoutManager.invalidateLayoutForRange(range)
219+
textView.layoutManager.endTransaction()
220+
textView.layoutManager.invalidateLayoutForRange(range)
221221
}
222222
}
223223

0 commit comments

Comments
 (0)