Skip to content

Commit 4a65b08

Browse files
authored
1 parent eeb87b3 commit 4a65b08

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

src/vs/workbench/contrib/mergeEditor/browser/view/fixedZoneWidget.ts

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
import { h } from 'vs/base/browser/dom';
77
import { Disposable } from 'vs/base/common/lifecycle';
88
import { ICodeEditor, IOverlayWidget, IViewZoneChangeAccessor } from 'vs/editor/browser/editorBrowser';
9+
import { Event } from 'vs/base/common/event';
910

1011
export abstract class FixedZoneWidget extends Disposable {
1112
private static counter = 0;
@@ -41,7 +42,9 @@ export abstract class FixedZoneWidget extends Disposable {
4142
});
4243
viewZoneIdsToCleanUp.push(this.viewZoneId);
4344

44-
this.widgetDomNode.style.left = this.editor.getLayoutInfo().contentLeft + 'px';
45+
this._register(Event.runAndSubscribe(this.editor.onDidLayoutChange, () => {
46+
this.widgetDomNode.style.left = this.editor.getLayoutInfo().contentLeft + 'px';
47+
}));
4548

4649
this.editor.addOverlayWidget(this.overlayWidget);
4750

0 commit comments

Comments
 (0)