Skip to content

Commit 8b3ad69

Browse files
committed
Skip invalidating suggestion early if no suggestion presented
1 parent cd124aa commit 8b3ad69

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

Core/Sources/Service/SuggestionCommandHandler/PseudoCommandHandler.swift

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -99,6 +99,10 @@ struct PseudoCommandHandler {
9999
guard let (_, filespace) = try? await Service.shared.workspacePool
100100
.fetchOrCreateWorkspaceAndFilespace(fileURL: fileURL) else { return }
101101

102+
if filespace.presentingSuggestion == nil {
103+
return // skip if there's no suggestion presented.
104+
}
105+
102106
let content = sourceEditor.getContent()
103107
if !filespace.validateSuggestions(
104108
lines: content.lines,

0 commit comments

Comments
 (0)