Skip to content

Commit 2dd772f

Browse files
committed
Improve AppKit Integration Documentation
1 parent 424453d commit 2dd772f

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

Sources/CodeEditSourceEditor/SourceEditor/SourceEditor.swift

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -103,7 +103,9 @@ public struct SourceEditor: NSViewControllerRepresentable {
103103
cursorPositions: state.cursorPositions ?? [],
104104
highlightProviders: context.coordinator.highlightProviders,
105105
undoManager: undoManager,
106-
coordinators: coordinators
106+
coordinators: coordinators,
107+
completionDelegate: completionDelegate,
108+
jumpToDefinitionDelegate: jumpToDefinitionDelegate
107109
)
108110
switch text {
109111
case .binding(let binding):
@@ -118,9 +120,6 @@ public struct SourceEditor: NSViewControllerRepresentable {
118120
controller.setCursorPositions(state.cursorPositions ?? [])
119121
}
120122

121-
controller.completionDelegate = completionDelegate
122-
controller.jumpToDefinitionModel?.delegate = jumpToDefinitionDelegate
123-
124123
context.coordinator.setController(controller)
125124
return controller
126125
}

0 commit comments

Comments
 (0)