Skip to content

Commit c7e59cb

Browse files
committed
Bump up version to v1.3.0
* Introduced a configuration to individually show/hide its commands from the context menu
1 parent 393d39c commit c7e59cb

File tree

3 files changed

+58
-9
lines changed

3 files changed

+58
-9
lines changed

CHANGELOG.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,13 @@ 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+
## [1.3.0] - 2018-07-28
9+
### Added
10+
- A configuration for individually show/hide Partial Diff commands on the context menu. [#27](https://github.com/ryu1kn/vscode-partial-diff/issues/27)
11+
12+
### Deprecated
13+
- `partialDiff.hideCommandsOnContextMenu` setting, as the new configuration can cover its use case.
14+
815
## [1.2.0] - 2018-06-27
916
### Added
1017
- A configuration to hide Partial Diff commands from the context menu. [#26](https://github.com/ryu1kn/vscode-partial-diff/issues/26)

README.md

Lines changed: 15 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -42,9 +42,18 @@
4242

4343
## Configurations
4444

45-
* `partialDiff.hideCommandsOnContextMenu` (default: `false`)
45+
* `partialDiff.commandsOnContextMenu` (default: `{"markSection1": true, ...}`, all commands visible)
46+
47+
Commands appear on the context menu. Unlisted commands will still appear.
48+
49+
For example, if you don't want to see *Compare Text in Visible Editors* command (Command ID: `extension.partialDiff.diffVisibleEditors`)
50+
on the context menu, you can set this setting as follows:
4651

47-
Hide Partial Diff commands on the context menu.
52+
```
53+
"partialDiff.commandsOnContextMenu": {
54+
"diffVisibleEditors": false
55+
}
56+
```
4857
4958
* `partialDiff.preComparisonTextNormalizationRules` (default: `[]`)
5059
@@ -86,6 +95,10 @@
8695
]
8796
```
8897
98+
* `partialDiff.hideCommandsOnContextMenu` (default: `false`)
99+
100+
(DEPRECATED) Hide Partial Diff commands on the context menu. Please use `partialDiff.commandsOnContextMenu` instead.
101+
89102
## Keyboard Shortcuts
90103
91104
You can quickly mark the selected text by adding the `partial-diff` commands to your keyboard shortcut settings. For example:

package.json

Lines changed: 36 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
"name": "partial-diff",
33
"displayName": "Partial Diff",
44
"description": "Compare (diff) text selections within a file, across files, or to the clipboard",
5-
"version": "1.2.0",
5+
"version": "1.3.0",
66
"publisher": "ryu1kn",
77
"license": "SEE LICENSE IN LICENSE.txt",
88
"icon": "images/partial-diff_128x128.png",
@@ -38,10 +38,39 @@
3838
"title": "Partial Diff configurations",
3939
"properties": {
4040
"partialDiff.hideCommandsOnContextMenu": {
41-
"description": "Hide Partial Diff commands on the context menu",
41+
"description": "(DEPRECATED) Hide Partial Diff commands on the context menu. Use `partialDiff.commandsOnContextMenu` instead",
4242
"type": "boolean",
4343
"default": false
4444
},
45+
"partialDiff.commandsOnContextMenu": {
46+
"description": "Commands appear on the context menu. Unlisted commands will appear on the menu",
47+
"type": "object",
48+
"properties": {
49+
"markSection1": {
50+
"type": "boolean"
51+
},
52+
"markSection2AndTakeDiff": {
53+
"type": "boolean"
54+
},
55+
"diffSelectionWithClipboard": {
56+
"type": "boolean"
57+
},
58+
"diffVisibleEditors": {
59+
"type": "boolean"
60+
},
61+
"togglePreComparisonTextNormalizationRules": {
62+
"type": "boolean"
63+
}
64+
},
65+
"default": {
66+
"markSection1": true,
67+
"markSection2AndTakeDiff": true,
68+
"diffSelectionWithClipboard": true,
69+
"diffVisibleEditors": true,
70+
"togglePreComparisonTextNormalizationRules": true
71+
},
72+
"additionalProperties": false
73+
},
4574
"partialDiff.preComparisonTextNormalizationRules": {
4675
"description": "Rules to normalize texts before taking a diff",
4776
"type": "array",
@@ -121,27 +150,27 @@
121150
{
122151
"command": "extension.partialDiff.markSection1",
123152
"group": "2_partialdiff@1",
124-
"when": "editorTextFocus && !config.partialDiff.hideCommandsOnContextMenu"
153+
"when": "editorTextFocus && !config.partialDiff.hideCommandsOnContextMenu && config.partialDiff.commandsOnContextMenu.markSection1"
125154
},
126155
{
127156
"command": "extension.partialDiff.markSection2AndTakeDiff",
128157
"group": "2_partialdiff@2",
129-
"when": "editorTextFocus && !config.partialDiff.hideCommandsOnContextMenu"
158+
"when": "editorTextFocus && !config.partialDiff.hideCommandsOnContextMenu && config.partialDiff.commandsOnContextMenu.markSection2AndTakeDiff"
130159
},
131160
{
132161
"command": "extension.partialDiff.diffSelectionWithClipboard",
133162
"group": "2_partialdiff@3",
134-
"when": "editorTextFocus && !config.partialDiff.hideCommandsOnContextMenu"
163+
"when": "editorTextFocus && !config.partialDiff.hideCommandsOnContextMenu && config.partialDiff.commandsOnContextMenu.diffSelectionWithClipboard"
135164
},
136165
{
137166
"command": "extension.partialDiff.diffVisibleEditors",
138167
"group": "2_partialdiff@4",
139-
"when": "editorTextFocus && !config.partialDiff.hideCommandsOnContextMenu"
168+
"when": "editorTextFocus && !config.partialDiff.hideCommandsOnContextMenu && config.partialDiff.commandsOnContextMenu.diffVisibleEditors"
140169
},
141170
{
142171
"command": "extension.partialDiff.togglePreComparisonTextNormalizationRules",
143172
"group": "2_partialdiff@5",
144-
"when": "editorTextFocus && !config.partialDiff.hideCommandsOnContextMenu"
173+
"when": "editorTextFocus && !config.partialDiff.hideCommandsOnContextMenu && config.partialDiff.commandsOnContextMenu.togglePreComparisonTextNormalizationRules"
145174
}
146175
]
147176
}

0 commit comments

Comments
 (0)