Allow to open either side of a diff editor as editor (fix #153786)#165765
Allow to open either side of a diff editor as editor (fix #153786)#165765bpasero merged 5 commits intomicrosoft:mainfrom
Conversation
|
Thanks for the PR, I can not guarantee a speedy reply on this, please be patient. |
|
I've made some good progress on this, thanks to @eamodio's help. This also sets up the unused ctrl/cmd + k, shift + O to open either side. Edit: When changing that to group editor it seems the diffEditor is disposed once closed and cannot be re-opened. I assume this was intentional. |
82ca40a to
75376da
Compare
bpasero
left a comment
There was a problem hiding this comment.
Why does this replace the PIN_EDITOR_COMMAND_ID command?
75376da to
20fc978
Compare
|
@bpasero you're right that looks like a mistake, I think I was experimenting there and didn't change it back before committing. |
20fc978 to
c7e583c
Compare
|
Hey @bpasero let me know what you think of the changes, I've hopefully addressed both of your points above. |
|
Thanks. I cleaned it up a little. |
|
Thanks for reviewing @bpasero @alexdima Are you able to offer any guidance to #166805? It feels a bit broken that you can navigate to a diff side but can’t go back. |
|
I think we only keep editors in the history that can be addressed via plain old JS objects (e.g. |

This is an attempt to implement #153786 by offering a way of going back to a single window from a diff. It should also be possible to display either side of the diff in a single window (other editors allow this).
When doing code reviews on GitHub you can open a file fully for context, then click back into the diff when done viewing. It should be just as easy to do this in VSCode.
This change would greatly improve productivity as it helps with navigating around changes and not needing to learn different keybindings/commands from other extensions.
Things that are needed:
To know which side of the diff has focus so I can open the right file, currently this doesn't seem possible as neither textDiffEditor nor diffEditorInput support showing which side has focus.Back currently doesn't work, once you open up an editor you can't go back to the diff viewAddressed in [Bug] Diff Editors are not in the back/forward history #166805Eventually an opportunity for a keybinding to open a window for each split you’re focused on. This increases productivity quite a bit as you can view the full file for context then go back to the diff.