Skip to content

Commit 2cb56ab

Browse files
committed
Update to resend open document notification after service is recreated
1 parent e3a6bc8 commit 2cb56ab

File tree

1 file changed

+11
-1
lines changed

1 file changed

+11
-1
lines changed

Core/Sources/Service/Workspace.swift

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,17 @@ final class Workspace {
9292
], context: nil
9393
)
9494

95-
private var _suggestionService: SuggestionServiceType?
95+
private var _suggestionService: SuggestionServiceType? {
96+
didSet {
97+
guard _suggestionService != nil else { return }
98+
Task {
99+
try await Task.sleep(nanoseconds: 1_000_000_000)
100+
for (_, filespace) in filespaces {
101+
notifyOpenFile(filespace: filespace)
102+
}
103+
}
104+
}
105+
}
96106

97107
private var suggestionService: SuggestionServiceType? {
98108
// Check if the workspace is disabled.

0 commit comments

Comments
 (0)