Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
hediet committed Jun 19, 2023
1 parent eeb87b3 commit 4a65b08
Showing 1 changed file with 4 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
import { h } from 'vs/base/browser/dom';
import { Disposable } from 'vs/base/common/lifecycle';
import { ICodeEditor, IOverlayWidget, IViewZoneChangeAccessor } from 'vs/editor/browser/editorBrowser';
import { Event } from 'vs/base/common/event';

export abstract class FixedZoneWidget extends Disposable {
private static counter = 0;
Expand Down Expand Up @@ -41,7 +42,9 @@ export abstract class FixedZoneWidget extends Disposable {
});
viewZoneIdsToCleanUp.push(this.viewZoneId);

this.widgetDomNode.style.left = this.editor.getLayoutInfo().contentLeft + 'px';
this._register(Event.runAndSubscribe(this.editor.onDidLayoutChange, () => {
this.widgetDomNode.style.left = this.editor.getLayoutInfo().contentLeft + 'px';
}));

this.editor.addOverlayWidget(this.overlayWidget);

Expand Down

0 comments on commit 4a65b08

Please sign in to comment.