Closed DivineDominion closed 1 year ago
NSTextStorageDelegate is informed about attribute changes, and the old setup would apply highlighting to attribute-only changes, too.
NSTextStorageDelegate
That doesn't sound too bad unless you begin to store attribute in the text storage:
https://github.com/ChimeHQ/Neon/blob/153d6e02e304eb76f3f4e58ffbec8741768e64a1/Sources/Neon/TextViewSystemInterface.swift#L72-L74
because then the highlighter loop will never stop.
Why I noticed and why I believe this is actually the correct way, stay tuned for Follow Up PR 3 :)
@mattmassicotte Sorry, forgot to mention I went ahead and made executionMode injectable (required in part to test this, but then also to use it in .synchronous mode in my app)
executionMode
.synchronous
Great change, thank you!
NSTextStorageDelegate
is informed about attribute changes, and the old setup would apply highlighting to attribute-only changes, too.That doesn't sound too bad unless you begin to store attribute in the text storage:
https://github.com/ChimeHQ/Neon/blob/153d6e02e304eb76f3f4e58ffbec8741768e64a1/Sources/Neon/TextViewSystemInterface.swift#L72-L74
because then the highlighter loop will never stop.
Why I noticed and why I believe this is actually the correct way, stay tuned for Follow Up PR 3 :)