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

@@ -11,7 +11,7 @@ import { Event } from 'vs/base/common/event';
import { IDisposable, Disposable, DisposableStore, MutableDisposable } from 'vs/base/common/lifecycle';
import 'vs/css!./parameterHints';
import { ContentWidgetPositionPreference, ICodeEditor, IContentWidget, IContentWidgetPosition } from 'vs/editor/browser/editorBrowser';
import { IConfigurationChangedEvent } from 'vs/editor/common/config/editorOptions';
import { ConfigurationChangedEvent, EditorOption } from 'vs/editor/common/config/editorOptions';
import * as modes from 'vs/editor/common/modes';
import { IModeService } from 'vs/editor/common/services/modeService';
import { MarkdownRenderer } from 'vs/editor/contrib/markdown/markdownRenderer';
@@ -105,14 +105,14 @@ export class ParameterHintsWidget extends Disposable implements IContentWidget,
}));
const updateFont = () => {
const fontInfo = this.editor.getConfiguration().fontInfo;
const fontInfo = this.editor.getOption(EditorOption.fontInfo);
this.element.style.fontSize = `${fontInfo.fontSize}px`;
};
updateFont();
this._register(Event.chain<IConfigurationChangedEvent>(this.editor.onDidChangeConfiguration.bind(this.editor))
.filter(e => e.fontInfo)
this._register(Event.chain<ConfigurationChangedEvent>(this.editor.onDidChangeConfiguration.bind(this.editor))
.filter(e => e.hasChanged(EditorOption.fontInfo))
.on(updateFont, null));
this._register(this.editor.onDidLayoutChange(e => this.updateMaxHeight()));
@@ -177,7 +177,7 @@ export class ParameterHintsWidget extends Disposable implements IContentWidget,
const code = dom.append(this.signature, $('.code'));
const hasParameters = signature.parameters.length > 0;
const fontInfo = this.editor.getConfiguration().fontInfo;
const fontInfo = this.editor.getOption(EditorOption.fontInfo);
code.style.fontSize = `${fontInfo.fontSize}px`;
code.style.fontFamily = fontInfo.fontFamily;