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

Quick Open shows files twice #1099

Closed
octref opened this issue Apr 3, 2019 · 1 comment
Closed

Quick Open shows files twice #1099

octref opened this issue Apr 3, 2019 · 1 comment
Assignees
Labels
bug Issue identified by VS Code Team member as probable bug

Comments

@octref
Copy link

octref commented Apr 3, 2019

  • Extension version: 0.5.1
  • VSCode Version: 1.33.0
  • OS: macOS

Steps to Reproduce:

  1. Checkout a branch
  2. Open the diff view from Files, then open the real file

image

@RMacfarlane RMacfarlane added the bug Issue identified by VS Code Team member as probable bug label May 1, 2019
@RMacfarlane
Copy link
Contributor

The right hand side of the diff editor that we open is a document that has a URI matching a local file, except with a query at the end of it. So then in the quickpick two version of the file are shown, the normal local file, and our version that has a query. @rebornix and I discussed potential fixes to this a while ago, it requires some work to get right.

If we drop the query from document on the right hand side of the diff editor, we would need to

  • change the comment controller so that comments for file scheme documents only include comments on existing lines and additions. Currently I believe comments on deletions are also shown closest to where the deletion was
  • For review scheme documents (i.e. the left side of the diff editor), only show comments that are on deleted lines. Currently we show comments on existing lines that are not additions on the left
  • Handle collapsing behavior appropriately. This is the thorniest part of the fix. We only have one set of comments for file scheme documents, so the collapse state is shared when you open a diff editor vs opening the local file. Ideally we want to expand comments by default when looking at a diff editor and collapse when looking at a local file. We need to be able to detect whether the visible editor is a diff editor or not, by looking at the visible text editor array we should be able to approximate this by seeing if the editor in the previous position of the array matches what we expect the URI of the left hand editor would be. Then we would need to update the collapsed state of all of the relevant file scheme document comments

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Issue identified by VS Code Team member as probable bug
Projects
None yet
Development

No branches or pull requests

3 participants