Skip to content

Commit

Permalink
Tree.updateTitle/getPaneName isn't recognized as used, because PaneRe…
Browse files Browse the repository at this point in the history
…naming is untyped
  • Loading branch information
OfekShilon committed May 14, 2024
1 parent 4af868c commit bfbee48
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions static/panes/tree.ts
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,7 @@ export class Tree {
private debouncedEmitChange: () => void = () => {};
private hideable: JQuery;
private readonly topBar: JQuery;
private paneName: string;
private paneRenaming: PaneRenaming;

constructor(hub: Hub, container: Container, state: TreeState) {
Expand Down Expand Up @@ -723,6 +724,15 @@ export class Tree {
this.sendCompileRequests();
}, newSettings.delayAfterChange);
}
private getPaneName() {
return `Tree #${this.id}`;
}

// eslint-disable-next-line no-unused-vars
updateTitle() {
const name = this.paneName ? this.paneName : this.getPaneName();
this.container.setTitle(escapeHTML(name));
}

private close() {
this.eventHub.unsubscribe();
Expand Down

0 comments on commit bfbee48

Please sign in to comment.