Skip to content

Allow wider SCM diff gutter decorations#321537

Open
FuZoe wants to merge 5 commits into
microsoft:mainfrom
FuZoe:codex-scm-diff-gutter-width
Open

Allow wider SCM diff gutter decorations#321537
FuZoe wants to merge 5 commits into
microsoft:mainfrom
FuZoe:codex-scm-diff-gutter-width

Conversation

@FuZoe

@FuZoe FuZoe commented Jun 16, 2026

Copy link
Copy Markdown

Fixes #278083

Why

scm.diffDecorationsGutterWidth was limited to the enumerated values 1 through 5, and the quick diff decorator also rejected values greater than 5 at runtime. That made the settings editor unable to pick wider gutter decorations, and manually entered larger values were reset to the default.

What

  • Replace the fixed 1-5 enum with a numeric range of 1-20 for scm.diffDecorationsGutterWidth.
  • Apply the same range in both SCM configuration registrations.
  • Update the runtime guard so values up to 20 are honored instead of falling back to 3.

Impact

This preserves the existing default of 3 and keeps invalid values guarded, while allowing users to select wider Source Control diff gutter decorations when they need more visible indicators.

Validation

  • npm run compile-check-ts-native -- --pretty false

@vs-code-engineering

Copy link
Copy Markdown
Contributor

📬 CODENOTIFY

The following users are being notified based on files changed in this PR:

@lszomoru

Matched files:

  • src/vs/workbench/contrib/scm/browser/quickDiff.contribution.ts
  • src/vs/workbench/contrib/scm/browser/quickDiffDecorator.ts
  • src/vs/workbench/contrib/scm/browser/scm.contribution.ts

@FuZoe

FuZoe commented Jun 24, 2026

Copy link
Copy Markdown
Author

This PR is ready for review. Happy to address any feedback. Thanks!

Copilot AI review requested due to automatic review settings July 6, 2026 06:18

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

scm.diffDecorationsGutterWidth allow higher values in settings editor

3 participants