@@ -93,7 +93,11 @@ export class MonacoLanguages implements Languages {
93
93
} ,
94
94
resolveCompletionItem : provider . resolveCompletionItem ? ( item , token ) => {
95
95
const protocolItem = this . m2p . asCompletionItem ( item ) ;
96
- return provider . resolveCompletionItem ! ( protocolItem , token ) . then ( item => this . p2m . asCompletionItem ( item ) ) ;
96
+ return provider . resolveCompletionItem ! ( protocolItem , token ) . then ( resolvedItem => {
97
+ const resolvedCompletionItem = this . p2m . asCompletionItem ( resolvedItem ) ;
98
+ Object . assign ( item , resolvedCompletionItem ) ;
99
+ return item ;
100
+ } ) ;
97
101
} : undefined
98
102
} ;
99
103
}
@@ -270,7 +274,11 @@ export class MonacoLanguages implements Languages {
270
274
return codeLens ;
271
275
}
272
276
const protocolCodeLens = this . m2p . asCodeLens ( codeLens ) ;
273
- return provider . resolveCodeLens ! ( protocolCodeLens , token ) . then ( result => this . p2m . asCodeLens ( result ) )
277
+ return provider . resolveCodeLens ! ( protocolCodeLens , token ) . then ( result => {
278
+ const resolvedCodeLens = this . p2m . asCodeLens ( result ) ;
279
+ Object . assign ( codeLens , resolvedCodeLens ) ;
280
+ return codeLens ;
281
+ } ) ;
274
282
} : ( ( m , codeLens , t ) => codeLens )
275
283
}
276
284
}
@@ -385,7 +393,11 @@ export class MonacoLanguages implements Languages {
385
393
// and the link doesn't have a url set
386
394
if ( provider . resolveDocumentLink && ( link . url === null || link . url === undefined ) ) {
387
395
const documentLink = this . m2p . asDocumentLink ( link ) ;
388
- return provider . resolveDocumentLink ( documentLink , token ) . then ( result => this . p2m . asILink ( result ) ) ;
396
+ return provider . resolveDocumentLink ( documentLink , token ) . then ( result => {
397
+ const resolvedLink = this . p2m . asILink ( result ) ;
398
+ Object . assign ( link , resolvedLink ) ;
399
+ return link ;
400
+ } ) ;
389
401
}
390
402
return link ;
391
403
}
0 commit comments