Skip to content

Commit

Permalink
Fix bug showing multiple cursor location items in statusbar
Browse files Browse the repository at this point in the history
  • Loading branch information
tareqimbasher committed May 2, 2023
1 parent 7ca2471 commit 359e687
Showing 1 changed file with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,9 @@ export class TextDocumentViewer extends Viewer {
this.open(this.viewable as ViewableTextDocument);
}

this.workbench.statusbarService.addItem(new TextEditorCursorPositionStatusbarItem(this.editor));
const item = new TextEditorCursorPositionStatusbarItem(this.editor);
this.workbench.statusbarService.addItem(item);
this.addDisposable(() => this.workbench.statusbarService.removeItem(item));
}

public override canOpen(viewableDocument: ViewableObject): boolean {
Expand Down

0 comments on commit 359e687

Please sign in to comment.