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

Scroll position should not change when returning to file #32397

Closed
mattacosta opened this issue Aug 12, 2017 · 6 comments
Closed

Scroll position should not change when returning to file #32397

mattacosta opened this issue Aug 12, 2017 · 6 comments
Assignees
Labels
bug Issue identified by VS Code Team member as probable bug code-lens *duplicate Issue identified as a duplicate of another issue(s)

Comments

@mattacosta
Copy link
Contributor

  • VSCode Version: Code - Insiders 1.16.0-insider (0b6da14, 2017-08-11T19:30:08.812Z)
  • OS Version: Windows_NT x64 6.1.7601
  • Extensions: none

Description
The scroll position moves down as references are retrieved. For large files, the position can be many lines away.

Steps to Reproduce:

  1. Set typescript.referencesCodeLens.enabled to true.
  2. Open any TS file (easiest to see when the file contains an enum).
  3. View a different file.
  4. Return to the original file.

scroll-codelens

@rebornix rebornix assigned bpasero and unassigned rebornix Aug 15, 2017
@bpasero bpasero added the editor label Aug 15, 2017
@bpasero bpasero assigned rebornix and unassigned bpasero Aug 15, 2017
@bpasero
Copy link
Member

bpasero commented Aug 15, 2017

Related to CodeLense?

@distante
Copy link

I just enabled referencesCodeLens and notice the same. We lost the place where we are even if the references were already loaded.

@eamodio
Copy link
Contributor

eamodio commented Sep 12, 2017

I am seeing the same and it only happens with code lens enabled. I see it in 1.16 but much more pronounced in 1.17.0-insider 2c385b9

@GregoryLawruszczuk
Copy link

Had this happen as well. Changing "typescript.referencesCodeLens.enabled" to false helped.

The same/very similar problem occurs with the Git Lens extension (https://marketplace.visualstudio.com/items?itemName=eamodio.gitlens ) with "gitlens.codeLens.enabled": true. This one might be less pronounced. Probably because the extension adds fewer lines than TypeScript CodeLens.

Windows 10, 64bit. VSCode 1.16.1, but I'm sure it was a problem before this version.

@eteisman
Copy link

eteisman commented Oct 30, 2017

I have noticed the same behavior: after switching a tab, and then back again the editor has scrolled away from its previous position. After setting "typescript.referencesCodeLens.enabled" to false this behavior disappeared.

With referencesCodeLens enabled, just switching tabs and back again, loses the previous cursor position.
The codeLensreferences are useful, because it allows me to quickly see and remove code that is not used. Due to this issue I have now disabled this feature.

Visual Code version 1.17.2, 64 bits, on Windows 10, TypeScript. This problem seems to have started for me possibly a month or two ago.

@jrieken
Copy link
Member

jrieken commented Nov 23, 2017

dupe of #19917

@jrieken jrieken closed this as completed Nov 23, 2017
@jrieken jrieken added the *duplicate Issue identified as a duplicate of another issue(s) label Nov 23, 2017
@vscodebot vscodebot bot locked and limited conversation to collaborators Jan 7, 2018
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 code-lens *duplicate Issue identified as a duplicate of another issue(s)
Projects
None yet
Development

No branches or pull requests

9 participants