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

Cursor jumps to various locations all by itself #68776

Closed
vvs opened this issue Feb 15, 2019 · 16 comments
Closed

Cursor jumps to various locations all by itself #68776

vvs opened this issue Feb 15, 2019 · 16 comments
Assignees
Labels
bug Issue identified by VS Code Team member as probable bug important Issue identified as high-priority outline Source outline view issues verified Verification succeeded
Milestone

Comments

@vvs
Copy link

vvs commented Feb 15, 2019

Issue Type: Bug

Latest VS Code Insiders build, with all extensions disabled. VS Code is basially totally broken for me. When I try to enter some code, the cursor jumps to other locations in the file from time to time, so it is impossible to write code.
It seems that the cursors jumps to the beginning of the enclosing block most of the time.

Let me know if you need any additional info. I see this problem in JavaScript, Typescript, CSS files for sure.

VS Code version: Code - Insiders 1.32.0-insider (003521e, 2019-02-15T06:16:29.903Z)
OS version: Windows_NT x64 10.0.17134

System Info
Item Value
CPUs Intel(R) Core(TM) i7-6700K CPU @ 4.00GHz (8 x 4008)
GPU Status 2d_canvas: enabled
checker_imaging: disabled_off
flash_3d: enabled
flash_stage3d: enabled
flash_stage3d_baseline: enabled
gpu_compositing: enabled
multiple_raster_threads: enabled_on
native_gpu_memory_buffers: disabled_software
rasterization: enabled
surface_synchronization: enabled_on
video_decode: enabled
webgl: enabled
webgl2: enabled
Memory (System) 31.87GB (14.83GB free)
Process Argv --disable-extensions .
Screen Reader no
VM 14%
Extensions disabled
@vscodebot vscodebot bot added the editor-contrib Editor collection of extras label Feb 15, 2019
@vvs
Copy link
Author

vvs commented Feb 15, 2019

Some more info. This happens when the Outline Explorer section is expanded. I see that it is being refreshed, and when it does the cursor jumps!
When the Outline is closed, the editor is back to normal.

@vvs vvs changed the title Cursors jumps to various locations all by itself Cursor jumps to various locations all by itself Feb 15, 2019
@kieferrm kieferrm added important Issue identified as high-priority outline Source outline view issues and removed editor-contrib Editor collection of extras labels Feb 15, 2019
@chriswiley
Copy link

chriswiley commented Feb 19, 2019

I am having the same issue. I disabled all extensions to see if any of them were affecting it, but the only way to get the editor back to normal is to close the outline view. I think when the outline reference is created it moves the cursor to that reference.

2019-02-19 01-45-25_4

@XcellMiguel
Copy link

I just had this problem and spent a few time searching for the error : Outline enabled AND Outline's Follow Cursor enabled.
If I disable the "Follow cursor" setting it does not shift the cursor when typing, even if the Outline view is opened.

@jduartedj
Copy link

OMG, I just found this thread after 2 days of searching! I was about to report a bug in Visual Studio Code and this was suggested!
I'm going MAD over this, I was starting to get used to using the Outline.
The outline is not following the cursor, the cursor is following the outline O.O

@XcellMiguel
Copy link

Well for some reason it was working without the "Follow cursor", but now it still jumps around.
Guess I have to close the outline for now.

@chriswiley
Copy link

Same for me. It worked for a short time then started jumping again. The only short term solution is to close the outline.

@jrieken jrieken added the bug Issue identified by VS Code Team member as probable bug label Feb 25, 2019
@jrieken jrieken modified the milestones: March 2019, February 2019 Feb 25, 2019
@jrieken
Copy link
Member

jrieken commented Feb 25, 2019

This is a regression from migrating the outline to use the new tree widget. Sorry for the carnage.

@jduartedj
Copy link

AH! Praise the Lord, Aleluia!
From the changed milestone I understand it'll be deployed soon, correct?

@jrieken
Copy link
Member

jrieken commented Feb 25, 2019

Sure, sure! I was out ⛷ ⛰ last week, that's why this didn't happen yet.

@jduartedj
Copy link

Sure, sure! I was out ⛷ ⛰ last week, that's why this didn't happen yet.

Great, Awesome! Hope the trip went well! (so jealous!)

@jrieken
Copy link
Member

jrieken commented Feb 25, 2019

I actually cannot reproduce with todays insiders or from source. Can someone please try. @joaomoreno Did the tree change anything wrt to focus/selection events? This issue likely due to my workaround for #64743. I have a _treeFakeUIEvent to know if it was the outline itself revealing an element or not. That must work or crazy jumping will happen...

@chriswiley
Copy link

I turned back on outline after a couple updates and I could not reproduce the problem. I even set follow cursor and it still doesn't jump. I'll be playing around with it today and see if it starts jumping again.

Version: 1.32.0-insider (user setup)
Commit: 393b48d
Date: 2019-02-25T01:34:48.785Z
Electron: 3.1.3
Chrome: 66.0.3359.181
Node.js: 10.2.0
V8: 6.6.346.32
OS: Windows_NT x64 10.0.17763

@joaomoreno
Copy link
Member

@jrieken Up until last Friday, the tree would fire selection/focus change events even if the selected/focused element collection didn't actually change: 3946e32#diff-a3991c7768fa71b7ffbcad3dea0b49c9

Maybe try to repro before that commit?

@jrieken
Copy link
Member

jrieken commented Feb 26, 2019

closing, this got fixed via 3946e32#diff-a3991c7768fa71b7ffbcad3dea0b49c9

@jrieken jrieken closed this as completed Feb 26, 2019
@vvs
Copy link
Author

vvs commented Feb 26, 2019

Hi, @jrieken , I can also confirm that the jumping cursor is fixed, even when I turn back the "Follow Cursor" option. But I noticed that the outline is not being scrolled into view when I move though my sources with "Follow Cursor" option enabled. I thought it worked that way before. Is this also a regression?

My expectation is that when I move my cursor to some function, in the source editor, the highlighted function name should be visible in the Outline view, and if the highlighted function is not currently visible, the view will be scrolled to make it visible to the user. Other views work that way (e.g., Open Editors view).

@jrieken
Copy link
Member

jrieken commented Feb 26, 2019

I thought it worked that way before. Is this also a regression?

Yeah, that was another regression for which I have pushed a fixed today

@jrieken jrieken added the verified Verification succeeded label Feb 26, 2019
@vscodebot vscodebot bot locked and limited conversation to collaborators Apr 12, 2019
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 important Issue identified as high-priority outline Source outline view issues verified Verification succeeded
Projects
None yet
Development

No branches or pull requests

7 participants