File tree Expand file tree Collapse file tree 2 files changed +7
-4
lines changed
src/vs/editor/contrib/suggest/browser Expand file tree Collapse file tree 2 files changed +7
-4
lines changed Original file line number Diff line number Diff line change @@ -178,13 +178,13 @@ export class CompletionOptions {
178
178
) { }
179
179
}
180
180
181
- let _snippetSuggestSupport : languages . CompletionItemProvider ;
181
+ let _snippetSuggestSupport : languages . CompletionItemProvider | undefined ;
182
182
183
- export function getSnippetSuggestSupport ( ) : languages . CompletionItemProvider {
183
+ export function getSnippetSuggestSupport ( ) : languages . CompletionItemProvider | undefined {
184
184
return _snippetSuggestSupport ;
185
185
}
186
186
187
- export function setSnippetSuggestSupport ( support : languages . CompletionItemProvider ) : languages . CompletionItemProvider {
187
+ export function setSnippetSuggestSupport ( support : languages . CompletionItemProvider | undefined ) : languages . CompletionItemProvider | undefined {
188
188
const old = _snippetSuggestSupport ;
189
189
_snippetSuggestSupport = support ;
190
190
return old ;
Original file line number Diff line number Diff line change @@ -230,7 +230,10 @@ export class SuggestModel implements IDisposable {
230
230
let set = supportsByTriggerCharacter . get ( ch ) ;
231
231
if ( ! set ) {
232
232
set = new Set ( ) ;
233
- set . add ( getSnippetSuggestSupport ( ) ) ;
233
+ const suggestSupport = getSnippetSuggestSupport ( ) ;
234
+ if ( suggestSupport ) {
235
+ set . add ( suggestSupport ) ;
236
+ }
234
237
supportsByTriggerCharacter . set ( ch , set ) ;
235
238
}
236
239
set . add ( support ) ;
You can’t perform that action at this time.
0 commit comments