Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/microsoft/vscode.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlex Ross <alros@microsoft.com>2020-05-29 12:44:27 +0300
committerAlex Ross <alros@microsoft.com>2020-05-29 12:44:27 +0300
commit1b6c367a9037aba9f1fe3fbf4b8c7d488c4133f1 (patch)
tree53e693d65f831b9a43e43a31f5be0fff5876e8e3
parentd59b031322eb252fd49b00b1c9a0e9b4e11fbe2e (diff)
Tasks wtih same type and label should be "equal"
Fixes #98617
-rw-r--r--src/vs/workbench/contrib/tasks/browser/taskQuickPick.ts5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/vs/workbench/contrib/tasks/browser/taskQuickPick.ts b/src/vs/workbench/contrib/tasks/browser/taskQuickPick.ts
index 2301c92706b..cd19578ce11 100644
--- a/src/vs/workbench/contrib/tasks/browser/taskQuickPick.ts
+++ b/src/vs/workbench/contrib/tasks/browser/taskQuickPick.ts
@@ -105,9 +105,12 @@ export class TaskQuickPick extends Disposable {
for (let j = 0; j < configuredTasks.length; j++) {
const workspaceFolder = configuredTasks[j].getWorkspaceFolder()?.uri.toString();
const definition = configuredTasks[j].getDefinition()?._key;
+ const type = configuredTasks[j].type;
+ const label = configuredTasks[j]._label;
const recentKey = configuredTasks[j].getRecentlyUsedKey();
const findIndex = recentTasks.findIndex((value) => {
- return (workspaceFolder && definition && value.getWorkspaceFolder()?.uri.toString() === workspaceFolder && value.getDefinition()?._key === definition)
+ return (workspaceFolder && definition && value.getWorkspaceFolder()?.uri.toString() === workspaceFolder
+ && ((value.getDefinition()?._key === definition) || (value.type === type && value._label === label)))
|| (recentKey && value.getRecentlyUsedKey() === recentKey);
});
if (findIndex === -1) {