@@ -113,10 +113,6 @@ export class CompletionHandler {
113113 return CompletionHandler . emptyCompletionList ;
114114 }
115115
116- const virtualDocumentUri = UriConverter . serialize ( virtualDocument . uri ) ;
117-
118- delegatedCompletionParams . identifier . textDocumentIdentifier . uri = virtualDocumentUri ;
119-
120116 // "@" is not a valid trigger character for C# / HTML and therefore we need to translate
121117 // it into a non-trigger invocation.
122118 const modifiedTriggerCharacter =
@@ -134,7 +130,6 @@ export class CompletionHandler {
134130 triggerKind ,
135131 modifiedTriggerCharacter ,
136132 virtualDocument as CSharpProjectedDocument ,
137- virtualDocumentUri ,
138133 delegatedCompletionParams . projectedPosition ,
139134 delegatedCompletionParams . provisionalTextEdit
140135 ) ;
@@ -181,10 +176,16 @@ export class CompletionHandler {
181176 triggerKind : CompletionTriggerKind ,
182177 triggerCharacter : string | undefined ,
183178 virtualDocument : CSharpProjectedDocument ,
184- virtualDocumentUri : string ,
185179 projectedPosition : Position ,
186180 provisionalTextEdit ?: SerializableTextEdit
187181 ) {
182+ if ( provisionalTextEdit ) {
183+ // provisional C# completion
184+ return this . provideCSharpProvisionalCompletions ( triggerCharacter , virtualDocument , projectedPosition ) ;
185+ }
186+
187+ // non-provisional C# completion
188+ const virtualDocumentUri = UriConverter . serialize ( virtualDocument . uri ) ;
188189 const params : CompletionParams = {
189190 context : {
190191 triggerKind : triggerKind ,
@@ -196,18 +197,6 @@ export class CompletionHandler {
196197 position : projectedPosition ,
197198 } ;
198199
199- if ( provisionalTextEdit ) {
200- // provisional C# completion
201- return this . provideCSharpProvisionalCompletions (
202- triggerKind ,
203- triggerCharacter ,
204- virtualDocument ,
205- virtualDocumentUri ,
206- projectedPosition
207- ) ;
208- }
209-
210- // non-provisional C# completion
211200 const csharpCompletions = await vscode . commands . executeCommand < CompletionList > (
212201 provideCompletionsCommand ,
213202 params
@@ -228,10 +217,8 @@ export class CompletionHandler {
228217 // 4. Remove temporarily (provisionally) added '.' from the projected C# buffer.
229218 // 5. Make sure the projected C# document is updated since the user will likely continue interacting with this document.
230219 private async provideCSharpProvisionalCompletions (
231- triggerKind : CompletionTriggerKind ,
232220 triggerCharacter : string | undefined ,
233221 virtualDocument : CSharpProjectedDocument ,
234- virtualDocumentUri : string ,
235222 projectedPosition : Position
236223 ) {
237224 const absoluteIndex = CompletionHandler . getIndexOfPosition ( virtualDocument , projectedPosition ) ;
0 commit comments