提交 e692fc72 编写于 作者: R Ramya Achutha Rao

Retain suggest docs stickyness with new editors

上级 f317513a
......@@ -392,9 +392,12 @@ export class SuggestWidget implements IContentWidget, IDelegate<ICompletionItem>
this.isAuto = false;
this.focusedItem = null;
this.storageService = storageService;
this.storageService.store('expandSuggestionDocs', expandSuggestionDocsByDefault, StorageScope.GLOBAL);
if (this.storageService.get('expandSuggestionDocs', StorageScope.GLOBAL) === undefined) {
this.storageServiceAvailable = false;
if (this.expandDocsSettingFromStorage() === undefined) {
this.storageService.store('expandSuggestionDocs', expandSuggestionDocsByDefault, StorageScope.GLOBAL);
if (this.expandDocsSettingFromStorage() === undefined) {
this.storageServiceAvailable = false;
}
}
this.element = $('.editor-widget.suggest-widget');
......@@ -1013,7 +1016,7 @@ export class SuggestWidget implements IContentWidget, IDelegate<ICompletionItem>
// Monaco Editor does not have a storage service
private expandDocsSettingFromStorage(): boolean {
if (this.storageServiceAvailable) {
return this.storageService.getBoolean('expandSuggestionDocs', StorageScope.GLOBAL, expandSuggestionDocsByDefault);
return this.storageService.getBoolean('expandSuggestionDocs', StorageScope.GLOBAL);
} else {
return this.expandSuggestionDocs;
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册