-
Notifications
You must be signed in to change notification settings - Fork 29k
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
Swapping between a file and a Markdown file causes the Markdown to scroll up each time #125964
Comments
I'm having this same—or a very similar—bug after updating to 1.57. When I am editing the same Markdown file open in two panes of split view, the scroll position seems to be linked. Note: this is editing in two panes, not an editor and a preview pane. For instance, I'll have the same file open in two panes when I'm writing an academic paper in markdown and want to easily compare the introduction and the conclusion. Let's say the left pane is scrolled to line 10 of the introduction, then I go into the right pane and scroll down to line 300 in order to edit the conclusion. When I click onto the left pane again, the scroll position jumps down to line 300, even though the cursor in that pane will stay at line 10 (or wherever it was previously). It will also select a lot of the text in the middle. I'm pretty certain that 1.57 introduced this behavior. I usually have the same file open in two panes like this since I use VS Code as a bullet journal / task manager as well as a standard code editor, but I've never seen this behavior until right after updating. I can't find any scroll position or other settings that will stop it, so I don't think it's an intended behavior. |
I can reproduce: Splitting on the same Markdown file (such that you have the same file open in a horizontal split or vertical split) will have the behavior @ryan-p-randall reports. That is, even if you have scrolled independently to different points of the file in the two splits, when you switch from one split to the other, the scrolled position is matched, regardless of where you were. This makes simultaneously editing two parts of the same Markdown file impossible. I can also confirm that the cursor position is not changed even when the display position is updated. I can further specify that this appears to be unique to Markdown files. The same behavior is not observed with plain text files or Org files, or any other filetype I have tried other than Markdown (.cs, .py, etc.) My system info: I too am pretty sure 1.57 introduced this issue, but I can't be positive. I know things didn't used to be this way (i.e., Markdown files behaved like all other files in this regard), but I only noticed it yesterday, so I can't be more specific than that. I can verify that older version(s) of VSCode don't have the same problem, though. The version of VSCode on my company-IT-controlled work laptop is 1.56.2, and the problem is evidently not present on that version. I've reproduced the issue on my computer even after clearing all settings and removing all extensions, and also reproduced it on a colleague's computer stock -- downloading VSCode 1.5.7 for the very first time on that computer. |
@andreamah Can you please check if this is the same issue as #126178 |
Issue Type: Bug
As per the embedded GIF below:
This started happening since VSC 1.57. All extensions disabled.
VS Code version: Code 1.57.0 (b4c1bd0, 2021-06-09T17:22:31.215Z)
OS version: Darwin x64 19.6.0
Restricted Mode: No
System Info
gpu_compositing: enabled
metal: disabled_off
multiple_raster_threads: enabled_on
oop_rasterization: enabled
opengl: enabled_on
rasterization: enabled
skia_renderer: disabled_off_ok
video_decode: enabled
webgl: enabled
webgl2: enabled
A/B Experiments
The text was updated successfully, but these errors were encountered: