提交 872525c9 编写于 作者: M Matt Bierner

Fix markdown preview not closing after chaning settings

Fixes #32009
上级 1af52c04
......@@ -178,7 +178,7 @@ export class HtmlPreviewPart extends WebviewEditor {
public setInput(input: EditorInput, options?: EditorOptions): TPromise<void> {
if (this.input && this.input.matches(input) && this._hasValidModel()) {
if (this.input && this.input.matches(input) && this._hasValidModel() && this.input instanceof HtmlInput && input instanceof HtmlInput && areHtmlInputOptionsEqual(this.input.options, input.options)) {
return TPromise.as(undefined);
}
......
......@@ -29,12 +29,4 @@ export class HtmlInput extends ResourceEditorInput {
) {
super(name, description, resource, textModelResolverService);
}
public matches(otherInput: any): boolean {
if (!super.matches(otherInput)) {
return false;
}
return otherInput instanceof HtmlInput && areHtmlInputOptionsEqual(this.options, otherInput.options);
}
}
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册