Prevent multiple markdown previews of the same type in the same editor group

This commit is contained in:
Matt Bierner
2018-02-26 16:35:05 -08:00
parent e22aac5b52
commit 6b743d8c61
3 changed files with 53 additions and 36 deletions

View File

@@ -325,13 +325,6 @@ class WebviewEditor extends BaseWebviewEditor {
super.clearInput();
}
public changePosition(position: Position): void {
if (this.input && this.input instanceof WebviewInput) {
this.input.onDidChangePosition(position);
}
super.changePosition(position);
}
async setInput(input: WebviewInput, options: EditorOptions): TPromise<void> {
if (this.input && this.input.matches(input)) {
return undefined;
@@ -345,6 +338,7 @@ class WebviewEditor extends BaseWebviewEditor {
await super.setInput(input, options);
input.onDidChangePosition(this.position);
this.updateWebview(input);
}