Skip to content

Commit 1f9007b

Browse files
committed
ref #26 Added a configuration to hide commands on the context menu
1 parent 85533d0 commit 1f9007b

File tree

3 files changed

+21
-6
lines changed

3 files changed

+21
-6
lines changed

CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,10 @@ All notable changes to "Partial Diff" extension will be documented in this file.
55
The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/)
66
and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.html).
77

8+
## Unreleased
9+
### Added
10+
- A configuration to hide Partial Diff commands from the context menu. [#26](https://github.com/ryu1kn/vscode-partial-diff/issues/26)
11+
812
## [1.1.0] - 2018-04-21
913
### Added
1014
- Selectively enable text normalisation rules on the extension startup. [#25](https://github.com/ryu1kn/vscode-partial-diff/issues/25)

README.md

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,13 @@
4242

4343
## Configurations
4444

45-
* `partialDiff.preComparisonTextNormalizationRules`: Rules to normalize texts for diff view.
45+
* `partialDiff.hideCommandsOnContextMenu` (default: `false`)
46+
47+
Hide Partial Diff commands on the context menu.
48+
49+
* `partialDiff.preComparisonTextNormalizationRules` (default: `[]`)
50+
51+
Rules to normalize texts for diff view.
4652

4753
It doesn't mutate texts in the editors. Only texts in diff views get normalised.
4854
If a diff is presented with text normalised (or possibly normalised), `~` is used in the diff title instead of ``)

package.json

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,11 @@
3737
"type": "object",
3838
"title": "Partial Diff configurations",
3939
"properties": {
40+
"partialDiff.hideCommandsOnContextMenu": {
41+
"description": "Hide Partial Diff commands on the context menu",
42+
"type": "boolean",
43+
"default": false
44+
},
4045
"partialDiff.preComparisonTextNormalizationRules": {
4146
"description": "Rules to normalize texts before taking a diff",
4247
"type": "array",
@@ -116,27 +121,27 @@
116121
{
117122
"command": "extension.partialDiff.markSection1",
118123
"group": "2_partialdiff@1",
119-
"when": "editorTextFocus"
124+
"when": "editorTextFocus && !config.partialDiff.hideCommandsOnContextMenu"
120125
},
121126
{
122127
"command": "extension.partialDiff.markSection2AndTakeDiff",
123128
"group": "2_partialdiff@2",
124-
"when": "editorTextFocus"
129+
"when": "editorTextFocus && !config.partialDiff.hideCommandsOnContextMenu"
125130
},
126131
{
127132
"command": "extension.partialDiff.diffSelectionWithClipboard",
128133
"group": "2_partialdiff@3",
129-
"when": "editorTextFocus"
134+
"when": "editorTextFocus && !config.partialDiff.hideCommandsOnContextMenu"
130135
},
131136
{
132137
"command": "extension.partialDiff.diffVisibleEditors",
133138
"group": "2_partialdiff@4",
134-
"when": "editorTextFocus"
139+
"when": "editorTextFocus && !config.partialDiff.hideCommandsOnContextMenu"
135140
},
136141
{
137142
"command": "extension.partialDiff.togglePreComparisonTextNormalizationRules",
138143
"group": "2_partialdiff@5",
139-
"when": "editorTextFocus"
144+
"when": "editorTextFocus && !config.partialDiff.hideCommandsOnContextMenu"
140145
}
141146
]
142147
}

0 commit comments

Comments
 (0)