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

Scrolling on mouse click #126178

Closed
kieferrm opened this issue Jun 13, 2021 · 4 comments · Fixed by #126285
Closed

Scrolling on mouse click #126178

kieferrm opened this issue Jun 13, 2021 · 4 comments · Fixed by #126285
Assignees
Labels
bug Issue identified by VS Code Team member as probable bug candidate Issue identified as probable candidate for fixing in the next release insiders-released Patch has been released in VS Code Insiders verified Verification succeeded

Comments

@kieferrm
Copy link
Member

Issue Type: Bug

I have been using

"editor.cursorSurroundingLines": 5,

for a long time. Currently I end up with a LOT of inadvertant selections when working in two side-by-side editor groups and switching back and forth between them using the mouse.

The reason is that the editor scrolls 5 lines every time I click into it.

VS Code version: Code - Insiders 1.58.0-insider (012b146, 2021-06-11T05:22:19.992Z)
OS version: Darwin arm64 20.5.0
Restricted Mode: No
Remote OS version: Linux x64 5.4.0-1046-azure

@kieferrm kieferrm added the bug Issue identified by VS Code Team member as probable bug label Jun 13, 2021
@alexdima
Copy link
Member

alexdima commented Jun 14, 2021

@kieferrm I cannot reproduce. Does this reproduce for you when disabling all extensions? (The editor exposes a revealRange API to extensions). I have recently also got #126146 which seems incredibly similar, but I am having a hard time reproducing any of the jumping that is described. Here I am trying two side-by-side editor groups:

Kapture.2021-06-14.at.17.37.58.mp4

@alexdima alexdima added the info-needed Issue requires more information from poster label Jun 14, 2021
@alexdima
Copy link
Member

alexdima commented Jun 14, 2021

This reproduces only when the language mode of the files are set to markdown.

@mjbvz I think this has to do with how the markdown extension is using the revealRange vscode API. But I think it should not use that API at all if no markdown preview is rendered. But it would also be interesting to test what the experience is when the preview is rendered. Given this doesn't reproduce with txt files, I'm optimistically giving this to you.

Steps to reproduce:

  • define "editor.cursorSurroundingLines": 5,
  • open two md files side-by-side (preferably without word wrapping to see the top line number change)
  • click on the editor tab of each one
  • on every click, the editor scrolls up by 5 lines
Kapture.2021-06-14.at.18.20.07.mp4

@alexdima alexdima assigned mjbvz and unassigned alexdima Jun 14, 2021
@alexdima alexdima removed the info-needed Issue requires more information from poster label Jun 14, 2021
@mjbvz
Copy link
Collaborator

mjbvz commented Jun 14, 2021

@andreamah Could you please take a look at this since you were looking into markdown syncing last iteration?

@andreamah
Copy link
Contributor

It seems like it's a bug coming from the scroll syncing between the static and text editor changes that I made a while ago. I'll try to make a PR to fix this soon.

This was referenced Jun 14, 2021
@andreamah andreamah added the candidate Issue identified as probable candidate for fixing in the next release label Jun 14, 2021
@andreamah andreamah added this to the May 2021 Recovery milestone Jun 14, 2021
andreamah added a commit that referenced this issue Jun 14, 2021
@sbatten sbatten added the verified Verification succeeded label Jun 16, 2021
@github-actions github-actions bot locked and limited conversation to collaborators Jul 29, 2021
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 candidate Issue identified as probable candidate for fixing in the next release insiders-released Patch has been released in VS Code Insiders verified Verification succeeded
Projects
None yet
Development

Successfully merging a pull request may close this issue.

6 participants
@kieferrm @alexdima @sbatten @mjbvz @andreamah and others