Skip to content

Editor view unexpectedly scrolls when typing, pressing space/enter, or saving in C# files #3059

Description

@sunrise-oneday

Describe the Issue

The editor viewport unexpectedly scrolls/jumps upward or downward when typing, triggering IntelliSense, pressing Space, Enter, or saving (Ctrl+S). This happens even when there is plenty of unused space below the editing area, and it shifts the target code away from center, making it impossible to stay focused on the current line.

Steps To Reproduce

  1. Open any relatively long C# script in a Unity project.
  2. Ensure there is enough empty space below the current editing area.
  3. Start typing a variable and trigger IntelliSense suggestions (e.g., type atkEffect.).
  4. Press Space, Enter, or Ctrl+S to save.
  5. Observe the editor viewport.

Expected Behavior

The editor viewport should remain stable when typing, using IntelliSense, pressing Enter/Space, or saving. No automatic scrolling should occur if there is still visible space for the cursor.

Environment Information

  • OS: Windows 11 23H2 (Windows_NT x64 10.0.22631)
  • VS Code Version: 1.114.0 (system setup)
  • Electron: 39.8.3
  • Chromium: 142.0.7444.265
  • Node.js: 22.22.1
  • V8: 14.2.231.22-electron.0
  • Extensions: Visual Studio Tools for Unity (vstuc)
  • Unity Version: 2022.3.62f3c1
  • VS Code A/B Experiments: None found in About dialog (version 1.114.0)

Metadata

Metadata

Assignees

No one assigned

    Labels

    area-unityUnity supportbugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions