diff --git a/package.json b/package.json index 821a16f3..d2f91065 100644 --- a/package.json +++ b/package.json @@ -224,13 +224,13 @@ "category": "Jujutsu" }, { - "command": "jj.copyPath", - "title": "Copy Path", + "command": "jj.copyRelativePath", + "title": "Copy Relative Path", "category": "Jujutsu" }, { - "command": "jj.copyRelativePath", - "title": "Copy Relative Path", + "command": "jj.copyPath", + "title": "Copy Path", "category": "Jujutsu" } ], @@ -397,14 +397,14 @@ "group": "inline" }, { - "command": "jj.copyPath", + "command": "jj.copyRelativePath", "when": "scmProvider == jj", "group": "1_copypath@1" }, { - "command": "jj.copyRelativePath", + "command": "jj.copyPath", "when": "scmProvider == jj", - "group": "1_copypath@1" + "group": "1_copypath@2" } ], "scm/resourceFolder/context": [ @@ -424,14 +424,14 @@ "group": "inline" }, { - "command": "jj.copyPath", + "command": "jj.copyRelativePath", "when": "scmProvider == jj", "group": "1_copypath@1" }, { - "command": "jj.copyRelativePath", + "command": "jj.copyPath", "when": "scmProvider == jj", - "group": "1_copypath@1" + "group": "1_copypath@2" } ], "commandPalette": [ diff --git a/src/main.ts b/src/main.ts index 8ad91590..abef2b18 100644 --- a/src/main.ts +++ b/src/main.ts @@ -1468,7 +1468,7 @@ export async function activate(context: vscode.ExtensionContext) { 'jj.copyRelativePath', async (resourceState: vscode.SourceControlResourceState) => { await vscode.env.clipboard.writeText( - vscode.workspace.asRelativePath(resourceState.resourceUri), + vscode.workspace.asRelativePath(resourceState.resourceUri.fsPath), ); }, ),