Semantic tokens not applied to deleted (original) lines in the inline/unified diff editor
- Dominant language
- TypeScript
- Stars
- 193k
- Forks
- 42.4k
- PR merge metrics
- PR metrics pending
Description
- VS Code Version: 1.132 & 1.133.0-insider
- OS Version: Windows 11 Enterprise
- Does this issue occur when all extensions are disabled?: Yes (reproduces with the built-in TypeScript language server, no third-party extensions)
In the **inline (unified)** diff editor, semantic-token coloring is applied to added and modified/context lines (which come from the *modified* model) but **not** to deleted lines (which come from the *original* model). The deleted lines only receive TextMate grammar tokenization, so their coloring is visibly inconsistent with the rest of the diff.
In **side-by-side** mode both sides are colored correctly, because both models are attached to live editors and semantic tokens are requested for each.
This reproduces with the **built-in TypeScript language server**, so it is not specific to a third-party extension.
### Steps to Reproduce
1. Open a TypeScript file and make edits that **delete** lines containing symbols that rely on semantic tokens (e.g. parameter names, enum members, namespaces, readonly properties — tokens the TextMate grammar alone does not color).
2. Open the diff (e.g. from Source Control, or the `git diff` view). ( Switch editor setting to open diff always inline view before opening diff for the file)
3. Observe:
- Added / modified lines → semantic coloring present.
- **Deleted lines → semantic coloring missing** (only TextMate Coloring is applied).
4. Switch back to side-by-side → deleted lines are now correctly semantically colored.
ScreenShot:
### Expected
Deleted lines in the inline diff should receive the same semantic-token coloring as the modified side, matching side-by-side behavior.
### Actual
Deleted lines in the inline diff are rendered with TextMate grammar tokenization only; semantic tokens are not applied.
Contributor guide
Assessment
This issue has not been assessed yet.