M4.3: side-by-side diff viewer with next/previous change

vcs.showDiff {path?, staged?} (Mod+Alt+Shift+D) opens a "Diff: <name>"
tab in the editor area: @codemirror/merge (MIT, loaded lazily, 27 kB /
9.7 kB gzip), with the index (or HEAD for the staged view) read-only on
the left, line breaks normalised to LF, and the working copy on the right,
editable through its normal engine buffer. vcs.nextChange (Alt+Shift+])
and vcs.previousChange (Alt+Shift+[) move between chunks. Binary, too
large, failed and deleted files show a notice. Entry points: the Changes
window, a new project tree context menu (Open, Show Diff; right click or
Shift+F10) and the palette/menu. Colours come from the --lt-vcs-* tokens.
21 Vitest tests; parity docs updated (Git 6% -> 8%, est.).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
danny 2026-10-26 17:23:52 +01:00
parent 468b9928a7
commit 8360ffc2e2
23 changed files with 1836 additions and 24 deletions

View file

@ -20,8 +20,11 @@
"command.terminal.open": "Terminal",
"command.unavailable": "{command} cannot run right now",
"command.vcs.commit": "Commit…",
"command.vcs.nextChange": "Next Change",
"command.vcs.openChanges": "Changes",
"command.vcs.previousChange": "Previous Change",
"command.vcs.refresh": "Refresh Changes",
"command.vcs.showDiff": "Show Diff",
"command.view.toggleProjectTree": "Show or Hide Project",
"command.view.toggleStructure": "Show or Hide Structure",
"common.cancel": "Cancel",
@ -177,6 +180,9 @@
"project.openFolder": "Open Folder…",
"project.toolWindow.title": "Project",
"project.tree.loading": "Loading…",
"project.tree.menu.label": "Actions for {name}",
"project.tree.menu.open": "Open",
"project.tree.menu.showDiff": "Show Diff",
"project.tree.truncated": "Listing truncated: more entries than can be shown",
"recovery.dialog.changedOnDisk": "The file changed on disk since then",
"recovery.dialog.discard": "Discard",
@ -292,6 +298,18 @@
"vcs.commit.hint": "Commit the staged changes ({keys})",
"vcs.commit.messageLabel": "Commit message",
"vcs.commit.placeholder": "Commit message",
"vcs.diff.binary": "Binary file: no text diff to show.",
"vcs.diff.captionHead": "{path}: last commit (left) and working copy (right)",
"vcs.diff.captionIndex": "{path}: staged version (left) and working copy (right)",
"vcs.diff.closeTab": "Close the diff of {name}",
"vcs.diff.failed": "The diff cannot be shown: {reason}",
"vcs.diff.invalidParams": "vcs.showDiff takes {path?: string, staged?: boolean}",
"vcs.diff.loading": "Reading the file from Git…",
"vcs.diff.noFile": "Open a file or pass a path to show its diff",
"vcs.diff.tabTitle": "Diff: {name}",
"vcs.diff.tabTitleStaged": "Diff: {name} (staged)",
"vcs.diff.tooLarge": "The file is too large to compare.",
"vcs.diff.workingCopyMissing": "The working copy cannot be opened ({reason}); it may have been deleted.",
"vcs.state.added": "added",
"vcs.state.conflicted": "conflicted",
"vcs.state.copied": "copied",