mirror of
https://github.com/microsoft/vscode.git
synced 2026-04-20 00:04:14 +08:00
don't suppress preview when handling onWill-events anymore, https://github.com/microsoft/vscode/issues/111878
This commit is contained in:
parent
a7fbcc27b7
commit
0929ea86cd
@ -69,7 +69,6 @@ export interface IBulkEditOptions {
|
||||
progress?: IProgress<IProgressStep>;
|
||||
token?: CancellationToken;
|
||||
showPreview?: boolean;
|
||||
suppressPreview?: boolean;
|
||||
label?: string;
|
||||
quotableLabel?: string;
|
||||
undoRedoSource?: UndoRedoSource;
|
||||
|
||||
@ -93,12 +93,7 @@ export class MainThreadFileSystemEventService {
|
||||
}
|
||||
|
||||
const edit = reviveWorkspaceEditDto2(data);
|
||||
await bulkEditService.apply(edit, {
|
||||
undoRedoGroupId,
|
||||
// this is a nested workspace edit, e.g one from a onWill-handler and for now we need to forcefully suppress
|
||||
// refactor previewing, see: https://github.com/microsoft/vscode/issues/111873#issuecomment-738739852
|
||||
suppressPreview: true
|
||||
});
|
||||
await bulkEditService.apply(edit, { undoRedoGroupId });
|
||||
}
|
||||
private _progressLabel(operation: FileOperation): string {
|
||||
switch (operation) {
|
||||
|
||||
@ -139,7 +139,7 @@ export class BulkEditService implements IBulkEditService {
|
||||
return { ariaSummary: localize('nothing', "Made no edits") };
|
||||
}
|
||||
|
||||
if (this._previewHandler && !options?.suppressPreview && (options?.showPreview || edits.some(value => value.metadata?.needsConfirmation))) {
|
||||
if (this._previewHandler && (options?.showPreview || edits.some(value => value.metadata?.needsConfirmation))) {
|
||||
edits = await this._previewHandler(edits, options);
|
||||
}
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user