diff --git a/package.json b/package.json index 021bc722..904c11d6 100644 --- a/package.json +++ b/package.json @@ -851,6 +851,15 @@ "type": "boolean", "description": "Refresh remote changes on refresh command", "default": false + }, + "svn.sourceControl.changesLeftClick": { + "type": "string", + "enum": [ + "open", + "open diff" + ], + "description": "Set left click functionality on changes resource state", + "default": "open diff" } } } diff --git a/src/resource.ts b/src/resource.ts index 66c43855..b2ef6f22 100644 --- a/src/resource.ts +++ b/src/resource.ts @@ -104,6 +104,18 @@ export class Resource implements SourceControlResourceState { @memoize get command(): Command { const diffHead = configuration.get("diff.withHead", true); + const changesLeftClick = configuration.get( + "sourceControl.changesLeftClick", + "open diff" + ); + + if (!this.remote && changesLeftClick === "open") { + return { + command: "svn.openFile", + title: "Open file", + arguments: [this] + }; + } if (this.remote || diffHead) { return {