Merge from vscode e5834d3280fcd04898efeac32b9cf1b893f9b127 (#9385)

* Merge from vscode e5834d3280fcd04898efeac32b9cf1b893f9b127

* distro
This commit is contained in:
Anthony Dresser
2020-02-28 00:37:06 -08:00
committed by GitHub
parent 70851716f7
commit 5d13ebf0d2
143 changed files with 1711 additions and 934 deletions

View File

@@ -260,7 +260,7 @@ export class UndoRedoService implements IUndoRedoService {
this._splitPastWorkspaceElement(element, element.removedResources.set);
const message = nls.localize('cannotWorkspaceUndo', "Could not undo '{0}' across all files. {1}", element.label, element.removedResources.createMessage());
this._notificationService.info(message);
return;
return this.undo(resource);
}
// this must be the last past element in all the impacted resources!
@@ -281,18 +281,25 @@ export class UndoRedoService implements IUndoRedoService {
const paths = cannotUndoDueToResources.map(r => r.scheme === Schemas.file ? r.fsPath : r.path);
const message = nls.localize('cannotWorkspaceUndoDueToChanges', "Could not undo '{0}' across all files because changes were made to {1}", element.label, paths.join(', '));
this._notificationService.info(message);
return;
return this.undo(resource);
}
return this._dialogService.show(
Severity.Info,
nls.localize('confirmWorkspace', "Would you like to undo '{0}' across all files?", element.label),
[
nls.localize('ok', "Yes, change {0} files.", affectedEditStacks.length),
nls.localize('nok', "No, change only this file.")
]
nls.localize('ok', "Undo In {0} Files", affectedEditStacks.length),
nls.localize('nok', "Undo This File"),
nls.localize('cancel', "Cancel"),
],
{
cancelId: 2
}
).then((result) => {
if (result.choice === 0) {
if (result.choice === 2) {
// cancel
return;
} else if (result.choice === 0) {
for (const editStack of affectedEditStacks) {
editStack.past.pop();
editStack.future.push(element);
@@ -344,7 +351,7 @@ export class UndoRedoService implements IUndoRedoService {
this._splitFutureWorkspaceElement(element, element.removedResources.set);
const message = nls.localize('cannotWorkspaceRedo', "Could not redo '{0}' across all files. {1}", element.label, element.removedResources.createMessage());
this._notificationService.info(message);
return;
return this.redo(resource);
}
// this must be the last future element in all the impacted resources!
@@ -365,7 +372,7 @@ export class UndoRedoService implements IUndoRedoService {
const paths = cannotRedoDueToResources.map(r => r.scheme === Schemas.file ? r.fsPath : r.path);
const message = nls.localize('cannotWorkspaceRedoDueToChanges', "Could not redo '{0}' across all files because changes were made to {1}", element.label, paths.join(', '));
this._notificationService.info(message);
return;
return this.redo(resource);
}
for (const editStack of affectedEditStacks) {