File tree Expand file tree Collapse file tree 1 file changed +7
-1
lines changed
src/vs/editor/contrib/inlineCompletions/browser Expand file tree Collapse file tree 1 file changed +7
-1
lines changed Original file line number Diff line number Diff line change @@ -221,7 +221,13 @@ export class UpToDateInlineCompletions implements IDisposable {
221
221
public dispose ( ) : void {
222
222
this . _refCount -- ;
223
223
if ( this . _refCount === 0 ) {
224
- this . textModel . deltaDecorations ( this . _inlineCompletions . map ( i => i . decorationId ) , [ ] ) ;
224
+ setTimeout ( ( ) => {
225
+ // To fix https://github.com/microsoft/vscode/issues/188348
226
+ if ( ! this . textModel . isDisposed ( ) ) {
227
+ // This is just cleanup. It's ok if it happens with a delay.
228
+ this . textModel . deltaDecorations ( this . _inlineCompletions . map ( i => i . decorationId ) , [ ] ) ;
229
+ }
230
+ } , 0 ) ;
225
231
this . inlineCompletionProviderResult . dispose ( ) ;
226
232
for ( const i of this . _prependedInlineCompletionItems ) {
227
233
i . source . removeRef ( ) ;
You can’t perform that action at this time.
0 commit comments