Skip to content
Draft
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions Sources/CodeEditSourceEditor/SourceEditor/SourceEditor.swift
Original file line number Diff line number Diff line change
Expand Up @@ -140,6 +140,14 @@ public struct SourceEditor: NSViewControllerRepresentable {
} else {
context.coordinator.isUpdatingFromRepresentable = true
updateControllerWithState(state, controller: controller)
switch text {
case .storage:
break
case let .binding(text):
if controller.text != text.wrappedValue {
controller.text = text.wrappedValue
}
}
context.coordinator.isUpdatingFromRepresentable = false
}

Expand Down