File tree Expand file tree Collapse file tree
src/vs/platform/undoRedo/common Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -440,18 +440,17 @@ export class UndoRedoService implements IUndoRedoService {
440440 }
441441 ) ;
442442
443- // At this point, it is possible that the element has been made invalid in the meantime (due to the confirmation await)
444- const verificationError = this . _checkWorkspaceUndo ( resource , element , affectedEditStacks ) ;
445- if ( verificationError ) {
446- return verificationError . returnValue ;
447- }
448-
449443 if ( result . choice === 2 ) {
450444 // cancel
451445 return ;
452446 }
453447
454448 if ( result . choice === 0 ) {
449+ // At this point, it is possible that the element has been made invalid in the meantime (due to the confirmation await)
450+ const verificationError = this . _checkWorkspaceUndo ( resource , element , affectedEditStacks ) ;
451+ if ( verificationError ) {
452+ return verificationError . returnValue ;
453+ }
455454 for ( const editStack of affectedEditStacks ) {
456455 editStack . past . pop ( ) ;
457456 editStack . future . push ( element ) ;
You can’t perform that action at this time.
0 commit comments