Merge from vscode 64980ea1f3f532c82bb6c28d27bba9ef2c5b4463 (#7206)

* Merge from vscode 64980ea1f3f532c82bb6c28d27bba9ef2c5b4463

* fix config changes

* fix strictnull checks
This commit is contained in:
Anthony Dresser
2019-09-15 22:38:26 -07:00
committed by GitHub
parent fa6c52699e
commit ea0f9e6ce9
1226 changed files with 21541 additions and 17633 deletions

View File

@@ -17,6 +17,7 @@ import { CodeLensWidget, CodeLensHelper } from 'vs/editor/contrib/codelens/codel
import { ICommandService } from 'vs/platform/commands/common/commands';
import { INotificationService } from 'vs/platform/notification/common/notification';
import { ICodeLensCache } from 'vs/editor/contrib/codelens/codeLensCache';
import { EditorOption } from 'vs/editor/common/config/editorOptions';
export class CodeLensContribution implements editorCommon.IEditorContribution {
@@ -40,13 +41,13 @@ export class CodeLensContribution implements editorCommon.IEditorContribution {
@INotificationService private readonly _notificationService: INotificationService,
@ICodeLensCache private readonly _codeLensCache: ICodeLensCache
) {
this._isEnabled = this._editor.getConfiguration().contribInfo.codeLens;
this._isEnabled = this._editor.getOption(EditorOption.codeLens);
this._globalToDispose.add(this._editor.onDidChangeModel(() => this._onModelChange()));
this._globalToDispose.add(this._editor.onDidChangeModelLanguage(() => this._onModelChange()));
this._globalToDispose.add(this._editor.onDidChangeConfiguration(() => {
const prevIsEnabled = this._isEnabled;
this._isEnabled = this._editor.getConfiguration().contribInfo.codeLens;
this._isEnabled = this._editor.getOption(EditorOption.codeLens);
if (prevIsEnabled !== this._isEnabled) {
this._onModelChange();
}
@@ -204,7 +205,7 @@ export class CodeLensContribution implements editorCommon.IEditorContribution {
}
}));
this._localToDispose.add(this._editor.onDidChangeConfiguration(e => {
if (e.fontInfo) {
if (e.hasChanged(EditorOption.fontInfo)) {
for (const lens of this._lenses) {
lens.updateHeight();
}