We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents d5eac0d + e36eb50 commit a15bd61Copy full SHA for a15bd61
Sources/SourceKitLSP/Swift/Diagnostic.swift
@@ -100,6 +100,12 @@ extension TextEdit {
100
// Snippets are only suppored in code completion.
101
// Remove SourceKit placeholders from Fix-Its because they can't be represented in the editor properly.
102
let replacementWithoutPlaceholders = rewriteSourceKitPlaceholders(inString: replacement, clientSupportsSnippets: false)
103
+
104
+ // If both the replacement without placeholders and the fixit are empty, no TextEdit should be created.
105
+ if (replacementWithoutPlaceholders.isEmpty && length == 0) {
106
+ return nil
107
+ }
108
109
self.init(range: position..<endPosition, newText: replacementWithoutPlaceholders)
110
} else {
111
return nil
0 commit comments