mirror of
https://github.com/ckaczor/azuredatastudio.git
synced 2026-02-12 02:58:31 -05:00
Merge from vscode e5834d3280fcd04898efeac32b9cf1b893f9b127 (#9385)
* Merge from vscode e5834d3280fcd04898efeac32b9cf1b893f9b127 * distro
This commit is contained in:
@@ -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) {
|
||||
|
||||
Reference in New Issue
Block a user