-
Notifications
You must be signed in to change notification settings - Fork 2.5k
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
Allow multiple editors for same file #9369
Allow multiple editors for same file #9369
Conversation
5ebf60f
to
2909df5
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I verified the changes and they look really good 👍 we now support splitting the same editor URI multiple times.
Do we plan on supporting different editors in the pull-request, or do we keep it for subsequent updates? (for example diff-editors):
split-diff.mp4
Happy to take a look at how other editors are initialized and try to accommodate them. I'll see about diff editors today - any other editor types you're interested in? |
I'm thinking anything which makes sense and is handled by |
2909df5
to
5875dc0
Compare
5875dc0
to
ed8a833
Compare
Signed-off-by: Colin Grant <colin.grant@ericsson.com>
ed8a833
to
16ca869
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I verified the changes under multiple use-cases and it works very well:
- confirmed that we can successfully split editors (standard editors, diff).
- editor state is preserved on split.
- confirmed that the 'split' commands work successfully.
- confirmed that the two keybindings work successfully.
- confirmed the following use-cases work for day-to-day use:
- search and replace with multiple duplicate editors.
- decorations for duplicate editors.
- problem markers for duplicate editors.
What it does
This PR fixes #3857 by allowing multiple editors to be opened for the same URI.
The basic principle is that all widget creation calls that go through the
EditorManager
add acounter
field to the widget options so that the widget manager creates separate widgets for separate counter entries. Theget
calls use an existing counter value;getOrCreate
an old if available, a new if necessary; andopenToSide
always creates a new value to ensure that a new widget is created.How to test
Review checklist
Reminder for reviewers
Signed-off-by: Colin Grant colin.grant@ericsson.com