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

Swapping between a file and a Markdown file causes the Markdown to scroll up each time #125964

Closed
garyking opened this issue Jun 10, 2021 · 5 comments
Assignees
Labels
*duplicate Issue identified as a duplicate of another issue(s)

Comments

@garyking
Copy link

garyking commented Jun 10, 2021

Issue Type: Bug

As per the embedded GIF below:

  1. Create an untitled file. Create another untitled file, set to Markdown language.
  2. The Markdown file should have a few dozen lines, to easily test. Scroll down near the bottom.
  3. Swap between the two files, using Ctrl-Tab. Each time you focus on the Markdown file, it will scroll up a few lines.

This started happening since VSC 1.57. All extensions disabled.

Kapture 2021-06-10 at 16 19 19

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
Item Value
CPUs Intel(R) Core(TM) i7-3615QM CPU @ 2.30GHz (8 x 2300)
GPU Status 2d_canvas: enabled
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
Load (avg) 2, 3, 3
Memory (System) 16.00GB (0.18GB free)
Process Argv -psn_0_187781898 --crash-reporter-id 33166f13-0cd4-4333-aabf-41b2210e787b
Screen Reader no
VM 0%
Extensions: none
A/B Experiments
vsliv368cf:30146710
vsreu685:30147344
python383cf:30185419
pythonvspyt678:30270856
pythonvspyt602:30300191
vspor879:30202332
vspor708:30202333
vspor363:30204092
pythonvspyt639:30300192
pythontb:30283811
pythonvspyt551cf:30311713
vspre833:30267464
pythonptprofiler:30281270
vshan820:30294714
vscoreces:30290705
pythondataviewer:30285071
vscus158:30286553
vscgsv2:30307504
vscorehov:30309549
vscod805cf:30301675
binariesv517:30312825

@mjbvz mjbvz self-assigned this Jun 10, 2021
@ryan-p-randall
Copy link

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.

@StevenTammen
Copy link

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:

image

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.

@mjbvz
Copy link
Collaborator

mjbvz commented Jun 14, 2021

@andreamah Can you please check if this is the same issue as #126178

@andreamah
Copy link
Contributor

Yes, the issues should be related to #126178 and will be fixed in #126293.

@mjbvz mjbvz added the *duplicate Issue identified as a duplicate of another issue(s) label Jun 14, 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
*duplicate Issue identified as a duplicate of another issue(s)
Projects
None yet
Development

No branches or pull requests

6 participants
@garyking @ryan-p-randall @mjbvz @StevenTammen @andreamah and others