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

onDidChangeTab fires twice when dirty state changes #145762

Closed
joyceerhl opened this issue Mar 22, 2022 · 3 comments
Closed

onDidChangeTab fires twice when dirty state changes #145762

joyceerhl opened this issue Mar 22, 2022 · 3 comments
Assignees
Labels
info-needed Issue requires more information from poster

Comments

@joyceerhl
Copy link
Contributor

Testing #145585

  1. Have two editor groups
  2. Modify the active file in one of the groups
  3. Hit save to mark editor not dirty
  4. 🐛 two onDidChangeTab events are fired
@joyceerhl
Copy link
Contributor Author

Also, should onDidChangeTab fire when a tab group closes? Right now it doesn't, but the other two events do fire

@lramos15
Copy link
Member

4. 🐛 two onDidChangeTab events are fired

Two events when you hit save? You should get one for when you make the edit because the tab becomes dirty and then one when you hit save because the tab is no longer dirty.

Also, should onDidChangeTab fire when a tab group closes? Right now it doesn't, but the other two events do fire

Probably not since we don't have any tab to return to you as it is gone

@lramos15 lramos15 added the info-needed Issue requires more information from poster label Mar 23, 2022
@joyceerhl
Copy link
Contributor Author

I only see one event fired now on save, and isDirty is correctly updated, thus closing.

@github-actions github-actions bot locked and limited conversation to collaborators May 12, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
info-needed Issue requires more information from poster
Projects
None yet
Development

No branches or pull requests

2 participants