Skip to content

Commit dc661cc

Browse files
authored
feat: Added config option to choose changes left click command (#417)
1 parent 8ac4144 commit dc661cc

File tree

2 files changed

+21
-0
lines changed

2 files changed

+21
-0
lines changed

package.json

+9
Original file line numberDiff line numberDiff line change
@@ -851,6 +851,15 @@
851851
"type": "boolean",
852852
"description": "Refresh remote changes on refresh command",
853853
"default": false
854+
},
855+
"svn.sourceControl.changesLeftClick": {
856+
"type": "string",
857+
"enum": [
858+
"open",
859+
"open diff"
860+
],
861+
"description": "Set left click functionality on changes resource state",
862+
"default": "open diff"
854863
}
855864
}
856865
}

src/resource.ts

+12
Original file line numberDiff line numberDiff line change
@@ -104,6 +104,18 @@ export class Resource implements SourceControlResourceState {
104104
@memoize
105105
get command(): Command {
106106
const diffHead = configuration.get<boolean>("diff.withHead", true);
107+
const changesLeftClick = configuration.get<string>(
108+
"sourceControl.changesLeftClick",
109+
"open diff"
110+
);
111+
112+
if (!this.remote && changesLeftClick === "open") {
113+
return {
114+
command: "svn.openFile",
115+
title: "Open file",
116+
arguments: [this]
117+
};
118+
}
107119

108120
if (this.remote || diffHead) {
109121
return {

0 commit comments

Comments
 (0)