|
2 | 2 | "name": "partial-diff", |
3 | 3 | "displayName": "Partial Diff", |
4 | 4 | "description": "Compare (diff) text selections within a file, across files, or to the clipboard", |
5 | | - "version": "1.2.0", |
| 5 | + "version": "1.3.0", |
6 | 6 | "publisher": "ryu1kn", |
7 | 7 | "license": "SEE LICENSE IN LICENSE.txt", |
8 | 8 | "icon": "images/partial-diff_128x128.png", |
|
38 | 38 | "title": "Partial Diff configurations", |
39 | 39 | "properties": { |
40 | 40 | "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", |
42 | 42 | "type": "boolean", |
43 | 43 | "default": false |
44 | 44 | }, |
| 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 | + }, |
45 | 74 | "partialDiff.preComparisonTextNormalizationRules": { |
46 | 75 | "description": "Rules to normalize texts before taking a diff", |
47 | 76 | "type": "array", |
|
121 | 150 | { |
122 | 151 | "command": "extension.partialDiff.markSection1", |
123 | 152 | "group": "2_partialdiff@1", |
124 | | - "when": "editorTextFocus && !config.partialDiff.hideCommandsOnContextMenu" |
| 153 | + "when": "editorTextFocus && !config.partialDiff.hideCommandsOnContextMenu && config.partialDiff.commandsOnContextMenu.markSection1" |
125 | 154 | }, |
126 | 155 | { |
127 | 156 | "command": "extension.partialDiff.markSection2AndTakeDiff", |
128 | 157 | "group": "2_partialdiff@2", |
129 | | - "when": "editorTextFocus && !config.partialDiff.hideCommandsOnContextMenu" |
| 158 | + "when": "editorTextFocus && !config.partialDiff.hideCommandsOnContextMenu && config.partialDiff.commandsOnContextMenu.markSection2AndTakeDiff" |
130 | 159 | }, |
131 | 160 | { |
132 | 161 | "command": "extension.partialDiff.diffSelectionWithClipboard", |
133 | 162 | "group": "2_partialdiff@3", |
134 | | - "when": "editorTextFocus && !config.partialDiff.hideCommandsOnContextMenu" |
| 163 | + "when": "editorTextFocus && !config.partialDiff.hideCommandsOnContextMenu && config.partialDiff.commandsOnContextMenu.diffSelectionWithClipboard" |
135 | 164 | }, |
136 | 165 | { |
137 | 166 | "command": "extension.partialDiff.diffVisibleEditors", |
138 | 167 | "group": "2_partialdiff@4", |
139 | | - "when": "editorTextFocus && !config.partialDiff.hideCommandsOnContextMenu" |
| 168 | + "when": "editorTextFocus && !config.partialDiff.hideCommandsOnContextMenu && config.partialDiff.commandsOnContextMenu.diffVisibleEditors" |
140 | 169 | }, |
141 | 170 | { |
142 | 171 | "command": "extension.partialDiff.togglePreComparisonTextNormalizationRules", |
143 | 172 | "group": "2_partialdiff@5", |
144 | | - "when": "editorTextFocus && !config.partialDiff.hideCommandsOnContextMenu" |
| 173 | + "when": "editorTextFocus && !config.partialDiff.hideCommandsOnContextMenu && config.partialDiff.commandsOnContextMenu.togglePreComparisonTextNormalizationRules" |
145 | 174 | } |
146 | 175 | ] |
147 | 176 | } |
|
0 commit comments