Skip to content

Commit

Permalink
fixed renaming and moving of open notebooks (#13467)
Browse files Browse the repository at this point in the history
* fixed renameing of open notebooks

Signed-off-by: Jonah Iden <jonah.iden@typefox.io>

* fixed moving of notebook editors to other areas

Signed-off-by: Jonah Iden <jonah.iden@typefox.io>

---------

Signed-off-by: Jonah Iden <jonah.iden@typefox.io>
  • Loading branch information
jonah-iden committed Mar 15, 2024
1 parent ae692d4 commit 991b4a4
Showing 1 changed file with 3 additions and 7 deletions.
10 changes: 3 additions & 7 deletions packages/notebook/src/browser/notebook-editor-widget.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -172,7 +172,7 @@ export class NotebookEditorWidget extends ReactWidget implements Navigatable, Sa
}

createMoveToUri(resourceUri: URI): URI | undefined {
return this.props.uri;
return this.model?.uri.withPath(resourceUri.path);
}

undo(): void {
Expand All @@ -199,12 +199,8 @@ export class NotebookEditorWidget extends ReactWidget implements Navigatable, Sa
}
}

protected override onAfterAttach(msg: Message): void {
super.onAfterAttach(msg);
}

protected override onAfterDetach(msg: Message): void {
super.onAfterDetach(msg);
protected override onCloseRequest(msg: Message): void {
super.onCloseRequest(msg);
this.notebookEditorService.removeNotebookEditor(this);
}

Expand Down

0 comments on commit 991b4a4

Please sign in to comment.