59

I just upgraded to VS Code 1.86, and it has started making the top / first / starting part of the code block I am looking at always stay shown at the top of the editor area while I scroll, in a split view/section. How can I get rid of this and make it go back to the old appearance without this feature?

AKA: Why did this change, and how can I disable sticky scroll in the editor area of VS Code?

0

4 Answers 4

86

For the Editor Area

VS Code started changing the default value of the editor.stickyScroll.enabled setting to true in VS Code 1.86 (see the iteration plan and issue ticket #202655).

There are multiple ways to turn it back off:

  • Right click the sticky scroll panel to be prompted to toggle it off

  • OR Run View: Toggle Sticky Scroll in the command palette (corresponding command ID is editor.action.toggleStickyScroll)

  • OR Open your user settings.json file by running Preferences: Open User Settings (JSON) in the command palette, and write "editor.stickyScroll.enabled": false and then save the change

Sticky Scroll was released in version 1.70 (July 2022), but up until version 1.86, it had been disabled by default.

The default has now been fully changed to on in version 1.87. You can also change the maximum number of lines that the sticky scroll panel takes up with the editor.stickyScroll.maxLineCount setting.

Note that sticky scroll is also supported in several other areas of the VS Code workbench, such as the terminal and tree views, which each have their corresponding settings and commands.

If you want to adjust the colour, open settings.json, create a key for workbench.colorCustomizations, and then trigger suggestions and type "stickyscroll" and you'll see what options there are.

For the Terminal

The default for sticky scroll in the terminal is (probably) changing in VS Code 1.89 to be enabled by default (issue ticket #209003). You can disable it using the terminal.integrated.stickyScroll.enabled setting, or toggle it using the Terminal: Toggle Sticky Scroll command (corresponding command ID is workbench.action.terminal.toggleStickyScroll).

Sign up to request clarification or add additional context in comments.

1 Comment

Note in the command pallet this has been split off into 4 options. View: Toggle Editor Sticky Scroll, Terminal: Toggle Sticky Scroll, View: Toggle Notebook Sticky Scroll, View: Toggle Tree Sticky Scroll. Best search for Sticky Scroll and click the option that best reflects the issue.
9

Just adding the approach I found quick and easy (from here):

  1. Right click on the sticky scroll header (i.e. the lines that are stuck to the top of your code/file)

  2. Click the option to disable sticky scroll

1 Comment

note: this was basically already stated in my pre-existing answer post. but I didn't know you didn't need to hold ctrl while clicking. I was basing off a comment by a VS Code maintainer who claimed that holding ctrl was necessary. I've since edited my answer.
2

setings to disable sticky scroll

go to settings , search for Sticky , then disable the option (Editor › Sticky Scroll: Enabled) as shown in the image

Comments

0

I was unsuccessful using command palette to attempt to set "editor.stickyScroll.enabled": false because of read-only permission.

Instead, I clicked on the gear icon at the bottom left of the VS Code window and selected "Settings". Then, searched "editor.stickyScroll" and was able to turn off Editor > Sticky Scroll: Enabled enter image description here

enter image description here

2 Comments

what exactly was read only? your user-level settings.json file? also, you don't "using command palette to attempt to set "editor.stickyScroll.enabled": false". you use the command palette to open the user-level settings.json file, where you put that JSON property.
When I tried your solution VSCode said I had "read-only" permissions. I found a simple work around going to 'Settings' and then unchecking "Shows the nested current scopes during the scroll at the top of the editor". If this helps somebody else, great!

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.