Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix bug where dirty positron notebook editors wont close #2578

Merged
merged 1 commit into from
Apr 1, 2024

Conversation

nstrayer
Copy link
Contributor

Addresses #2576

Intent

Fixes issue noted by @seeM that you can get into a situation where a Positron notebook won't close.

Approach

The problem was that the notebook input was requested to run the .revert() method. This method is defined as a no-op on the base-class EditorInput that PositronNotebookEditorInput extends. This method is called by the workbench service when trying to close the editor and then it checks to make sure the revert was successful by looking at the dirty status again. Since we weren't doing anything it takes that as us telling it to not close.

@nstrayer nstrayer requested a review from seeM March 29, 2024 19:17
Copy link
Contributor

@seeM seeM left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM! Tested locally and it fixed the bug too

@nstrayer nstrayer merged commit 738604a into main Apr 1, 2024
1 check passed
@nstrayer nstrayer deleted the bugfix/cant-close-notebook branch April 1, 2024 14:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants