microsoft / microsoft/vscode

Setting to control original line numbers shown in the inline diff view

Open
#329,944 0 comments 0 reactions 1 assignee Claimed by @hediet View on GitHub
Dominant language
TypeScript
Stars
193k
Forks
42.4k
PR merge metrics
PR metrics pending

Description

## Describe the feature you'd like

When the diff editor uses the **inline view** (e.g. switching a Git diff to `Inline View`), it currently renders a narrow column with the **original (before-edit) line numbers** to the left of the modified content. This differs from GitHub Copilot's inline diff, which drops that column and shows only the after-edit line numbers.

I'd like a user setting to control this behavior. It should default to hiding the original line numbers in the inline view, with an option to bring them back.

## Proposed behavior

- New setting `diffEditor.hideOriginalLineNumbers` (boolean).
- Default: `true`, meaning the inline diff view does not show the line numbers of the file before changes.
- Setting it to `false` restores the before/after line numbers in the inline view.
- Only affects the inline view; the side-by-side view is unchanged.

A prototype is implemented in PR https://github.com/microsoft/vscode/pull/329899.

## Describe alternatives you've considered

Keeping the current behavior and only adding an opt-out setting (default `false`) — but the request is to make hiding the original line numbers the default in the inline view.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.