We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 2becfe2 commit 729feb1Copy full SHA for 729feb1
1 file changed
Core/Sources/Service/Workspace.swift
@@ -33,9 +33,12 @@ final class Filespace {
33
self.fileURL = fileURL
34
}
35
36
- func reset() {
+ func reset(resetSnapshot: Bool = true) {
37
suggestions = []
38
suggestionIndex = 0
39
+ if resetSnapshot {
40
+ Snapshot = .init(linesHash: -1, cursorPosition: .outOfScope)
41
+ }
42
43
44
@@ -168,7 +171,7 @@ extension Workspace {
168
171
Task {
169
172
await service.notifyRejected(filespaces[fileURL]?.suggestions ?? [])
170
173
- filespaces[fileURL]?.reset()
174
+ filespaces[fileURL]?.reset(resetSnapshot: false)
175
176
177
func acceptSuggestion(forFileAt fileURL: URL) -> CopilotCompletion? {
0 commit comments