mirror of
https://github.com/microsoft/vscode.git
synced 2026-04-25 02:58:56 +01:00
suppress refactor preview from onWill-handler, workaround for https://github.com/microsoft/vscode/issues/111873
This commit is contained in:
@@ -39,6 +39,12 @@ export class MainThreadBulkEdits implements MainThreadBulkEditsShape {
|
||||
|
||||
$tryApplyWorkspaceEdit(dto: IWorkspaceEditDto, undoRedoGroupId?: number): Promise<boolean> {
|
||||
const edits = reviveWorkspaceEditDto2(dto);
|
||||
return this._bulkEditService.apply(edits, { undoRedoGroupId }).then(() => true, _err => false);
|
||||
return this._bulkEditService.apply(edits, {
|
||||
// having a undoRedoGroupId means that 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
|
||||
undoRedoGroupId,
|
||||
suppressPreview: typeof undoRedoGroupId === 'number' ? true : undefined
|
||||
}).then(() => true, _err => false);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user