дзеркало
https://github.com/l0ng-ai/openidea.git
синхронізовано 2026-11-09 03:05:40 +02:00
feat(vcs): offer Compare With… in the editor and tab menus, and outside the desktop app (#433)
Compare With… was only in the Project view menu and needed the OS file dialog. The editor context menu (with Compare with Clipboard) and the editor tab menu now offer it too, and outside the desktop app (remote development, browser) a browser file picker supplies the file, compared as text. Co-authored-by: a-rookie-of-C-language <[email protected]>
Цей коміт міститься в:
1 джерело
9295a8f78a
коміт
19b96b60a4
4 files changed
+101
-3
No files matched your search
@@ -177,6 +177,17 @@ describe("project view context menu", () => {
|
||||
expect(l).not.toContain("Compare With…");
|
||||
});
|
||||
|
||||
it("offers Compare With… in a non-git project too", () => {
|
||||
useProject.setState({
|
||||
project: { name: "p", root: ROOT, isGit: false, settings: {} } as never,
|
||||
settings: {} as never,
|
||||
});
|
||||
const l = labels(contextMenuItems([node(`${ROOT}/a.py`)]));
|
||||
expect(l).not.toContain("Git");
|
||||
expect(l).toContain("Compare With…");
|
||||
expect(labels(contextMenuItems([node(`${ROOT}/a.py`), node(`${ROOT}/b.py`)]))).toContain("Compare Files");
|
||||
});
|
||||
|
||||
it("never shows an empty submenu", () => {
|
||||
disposers.forEach((d) => d());
|
||||
disposers = [];
|
||||
|
||||
Reference in new issue
Заблокувати користувача