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

SCM: editor selection not applied when jumping from diff back to editor #30674

Closed
bpasero opened this issue Jul 14, 2017 · 9 comments
Closed
Assignees
Labels
bug Issue identified by VS Code Team member as probable bug git GIT issues verified Verification succeeded
Milestone

Comments

@bpasero
Copy link
Member

bpasero commented Jul 14, 2017

We now nicely restore the selection when jumping from editor to the diff editor but we do not seem to do the same thing when going from diff editor to normal editor (which is actually my main use case).

I think the missing piece is that vscode.open allows to provide the same editor options and git extension to adopt that. Created PR #30675 for the missing API in the command.

@joaomoreno
Copy link
Member

joaomoreno commented Jul 17, 2017

I wonder how long it would take for you to notice this.

Dependent on #30829

@joaomoreno joaomoreno added this to the July 2017 milestone Jul 17, 2017
@joaomoreno joaomoreno added the bug Issue identified by VS Code Team member as probable bug label Jul 17, 2017
@bpasero
Copy link
Member Author

bpasero commented Jul 17, 2017

@joaomoreno you do not really depend on #30829 imho, you can always do openTextDocument followed by showTextDocument. My PR is just syntactic sugar for that.

@joaomoreno joaomoreno modified the milestones: July 2017, August 2017 Jul 26, 2017
@joaomoreno
Copy link
Member

Working.

bpasero added a commit that referenced this issue Aug 29, 2017
@bpasero
Copy link
Member Author

bpasero commented Aug 29, 2017

Now it is...

@bpasero bpasero self-assigned this Aug 29, 2017
bpasero added a commit that referenced this issue Aug 30, 2017
@bpasero
Copy link
Member Author

bpasero commented Aug 30, 2017

Actually I found another case where it was not working: When having a file on the index.

Verify: you can jump between file and diff by maintaining the selection and it works if a change is staged or not.

@dbaeumer dbaeumer reopened this Sep 1, 2017
@dbaeumer dbaeumer closed this as completed Sep 1, 2017
@dbaeumer dbaeumer added the verified Verification succeeded label Sep 1, 2017
@dbaeumer
Copy link
Member

dbaeumer commented Sep 1, 2017

Needs to only work from diff -> editor. Verified. The other direction is not working. Hope that is expected.

@bpasero
Copy link
Member Author

bpasero commented Sep 1, 2017

@dbaeumer it should work in both directions both if a file is in "Working Files" as well as "Index".

@dbaeumer
Copy link
Member

dbaeumer commented Sep 4, 2017

@bpasero the other direction didn't work for me. It always selected the first diff regardless of what I had selected before. Leave it up to you and @joaomoreno to reopen or to create a new issue.

@joaomoreno
Copy link
Member

It depends on where the command is executed from:

  • Clicking a diff in the viewlet: reveals the first diff
  • Choosing the Open Change context menu command in the viewlet: reveals the first diff
  • Editor title: keeps selection
  • Command Pallette: keeps selection

@vscodebot vscodebot bot locked and limited conversation to collaborators Nov 17, 2017
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Issue identified by VS Code Team member as probable bug git GIT issues verified Verification succeeded
Projects
None yet
Development

No branches or pull requests

3 participants