File tree Expand file tree Collapse file tree 4 files changed +21
-0
lines changed Expand file tree Collapse file tree 4 files changed +21
-0
lines changed Original file line number Diff line number Diff line change @@ -119,3 +119,6 @@ node_modules/
119
119
* .code-workspace
120
120
.history
121
121
.vscode
122
+
123
+ # vim stuff
124
+ * .swp
Original file line number Diff line number Diff line change 17
17
"description" : " Disable all branch operations (new, switch) when there are changed/staged files" ,
18
18
"default" : false
19
19
},
20
+ "doubleClickDiff" : {
21
+ "type" : " boolean" ,
22
+ "title" : " Show diff on double click" ,
23
+ "description" : " If true doubling clicking a file in the changed files list will open a diff" ,
24
+ "default" : true
25
+ },
20
26
"historyCount" : {
21
27
"type" : " integer" ,
22
28
"title" : " History count" ,
Original file line number Diff line number Diff line change @@ -21,6 +21,7 @@ export namespace CommandIDs {
21
21
export const gitInit = 'git:init' ;
22
22
export const gitOpenUrl = 'git:open-url' ;
23
23
export const gitToggleSimpleStaging = 'git:toggle-simple-staging' ;
24
+ export const gitToggleDoubleClickDiff = 'git:toggle-double-click-diff' ;
24
25
export const gitAddRemote = 'git:add-remote' ;
25
26
export const gitClone = 'git:clone' ;
26
27
}
@@ -115,6 +116,15 @@ export function addCommands(
115
116
}
116
117
} ) ;
117
118
119
+ /** add toggle for double click opens diffs */
120
+ commands . addCommand ( CommandIDs . gitToggleDoubleClickDiff , {
121
+ label : 'Double click opens diff' ,
122
+ isToggled : ( ) => ! ! settings . composite [ 'doubleClickDiff' ] ,
123
+ execute : args => {
124
+ settings . set ( 'doubleClickDiff' , ! settings . composite [ 'doubleClickDiff' ] ) ;
125
+ }
126
+ } ) ;
127
+
118
128
/** Command to add a remote Git repository */
119
129
commands . addCommand ( CommandIDs . gitAddRemote , {
120
130
label : 'Add remote repository' ,
Original file line number Diff line number Diff line change @@ -161,5 +161,7 @@ function createGitMenu(
161
161
162
162
menu . addItem ( { command : CommandIDs . gitToggleSimpleStaging } ) ;
163
163
164
+ menu . addItem ( { command : CommandIDs . gitToggleDoubleClickDiff } ) ;
165
+
164
166
return menu ;
165
167
}
You can’t perform that action at this time.
0 commit comments