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

@@ -164,8 +164,10 @@ export class ExtHostWebviews implements ExtHostWebviewsShape {
const webview = this._webviews.get(handle);
if (webview) {
const newViewColumn = typeConverters.toViewColumn(newPosition);
webview.viewColumn = newViewColumn;
webview.onDidChangeViewColumnEmitter.fire(newViewColumn);
if (webview.viewColumn !== newViewColumn) {
webview.viewColumn = newViewColumn;
webview.onDidChangeViewColumnEmitter.fire(newViewColumn);
}
}
}