Repository navigation
Add diffEditor.hideOriginalLineNumbers setting to hide original line numbers in inline view - #334531
Conversation
…numbers in inline view
|
Context: this PR replaces #329899, which was closed automatically when my fork was deleted from GitHub. GitHub cannot reopen a PR whose head repository was deleted, so the branch was rebuilt from the original commit (same message and authorship) on top of the current main. Maintainers: please judge this PR in place of the closed #329899. Thank you! |
There was a problem hiding this comment.
🟡 Changes recommended
The shared default changes Monaco’s public behavior without exposing a supported opt-out.
Once you've addressed the issues Copilot identified, you can request another Copilot review.
Pull request overview
Adds a setting to hide original line numbers in inline diff views.
Changes:
- Registers
diffEditor.hideOriginalLineNumbers, defaulting totrue. - Updates the internal option documentation and widget default.
File summaries
| File | Description |
|---|---|
editorOptions.ts |
Documents the new default. |
editorConfigurationSchema.ts |
Registers the setting. |
diffEditor.ts |
Changes the shared widget default. |
Review details
- Files reviewed: 3/3 changed files
- Comments generated: 1
- Review effort level: Balanced
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
…Code config The shared diffEditor widget default stays compatible with standalone Monaco consumers (hideOriginalLineNumbers: false). The true default is now applied through VS Code's configuration layer so users get the expected behavior without breaking monaco.editor.createDiffEditor.
|
Fixes #329944
Summary
Adds a user-facing setting to toggle the original (before-edit) line numbers in the diff editor's inline view.
The diff editor already had an internal
hideOriginalLineNumbersoption (used by the Copilot/Agents changes editors and multi-diff inline rendering) that drops the narrow original line-number column in the inline view, making the code sit flush left like GitHub Copilot's inline diff. This change exposes it as a setting and makes hiding the original line numbers the default.Changes
diffEditor.hideOriginalLineNumbers(boolean, defaulttrue) — when enabled, the inline diff view does not show the line numbers of the file before changes. Uncheck to show the before/after line numbers as before.Verification
tsc --noEmit -p src/tsconfig.jsonpassesRestored PR: This replaces #329899, which was closed automatically when my fork was deleted from GitHub. GitHub cannot reopen a PR whose head repository was deleted, so the branch was rebuilt from the original commit (same message and authorship) on top of the current
main. Please review this PR in place of #329899.