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

Close duplicate editors on same tabbar #12147

Conversation

colin-grant-work
Copy link
Contributor

What it does

Implements behavior similar to VSCode's where editors already on a given tabbar for a given URI are closed when a new editor for that URI is moved onto the tabbar.

How to test

  1. Split an editor.
  2. Change the states of the two editors.
  3. Move one editor onto the other's tabbar.
  4. Observe that the moved editor remains open, and the other editor is closed.

Review checklist

Reminder for reviewers

@colin-grant-work colin-grant-work changed the title Close other editors found on same tabbar Close duplicate editors on same tabbar Feb 3, 2023
@msujew msujew self-requested a review February 6, 2023 15:07
@msujew msujew added the shell issues related to the core shell label Feb 6, 2023
Copy link
Member

@msujew msujew left a comment

Choose a reason for hiding this comment

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

Looks good to me 👍

  • Moving a duplicated editor from one group to another that already has an editor for that file closes the editor correctly
  • Other information in the model, such as dirty state, etc. are kept as expected.

Copy link
Member

@vince-fugnitto vince-fugnitto left a comment

Choose a reason for hiding this comment

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

I second Mark's comments and confirm the changes work as expected 👍

@colin-grant-work colin-grant-work merged commit 62ada24 into eclipse-theia:master Feb 9, 2023
@colin-grant-work colin-grant-work deleted the feature/no-duplicate-editors-same-tab branch February 9, 2023 22:24
@colin-grant-work colin-grant-work added this to the 1.35.0 milestone Feb 9, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
shell issues related to the core shell
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants