未验证 提交 e6b16e83 编写于 作者: A Alex Dima

Only validate if a workspace undo is selected

上级 4db079b8
......@@ -440,18 +440,17 @@ export class UndoRedoService implements IUndoRedoService {
}
);
// At this point, it is possible that the element has been made invalid in the meantime (due to the confirmation await)
const verificationError = this._checkWorkspaceUndo(resource, element, affectedEditStacks);
if (verificationError) {
return verificationError.returnValue;
}
if (result.choice === 2) {
// cancel
return;
}
if (result.choice === 0) {
// At this point, it is possible that the element has been made invalid in the meantime (due to the confirmation await)
const verificationError = this._checkWorkspaceUndo(resource, element, affectedEditStacks);
if (verificationError) {
return verificationError.returnValue;
}
for (const editStack of affectedEditStacks) {
editStack.past.pop();
editStack.future.push(element);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册