mirror of
https://github.com/Microsoft/vscode
synced 2024-09-13 21:55:38 +00:00
backup and recover scratchpads for exitreason=load
This commit is contained in:
parent
4cb8a48746
commit
f39299b594
|
@ -197,7 +197,7 @@ export class NativeWorkingCopyBackupTracker extends WorkingCopyBackupTracker imp
|
|||
if (this.contextService.getWorkbenchState() !== WorkbenchState.EMPTY && this.filesConfigurationService.hotExitConfiguration === HotExitConfiguration.ON_EXIT_AND_WINDOW_CLOSE) {
|
||||
return modifiedWorkingCopies; // backup if a folder is open and onExitAndWindowClose is configured
|
||||
} else {
|
||||
return []; // do not backup because we are switching contexts
|
||||
return modifiedWorkingCopies.filter(wc => wc.capabilities & WorkingCopyCapabilities.Scratchpad); // only backup scratchpads because we are switching contexts
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -602,17 +602,17 @@ suite('WorkingCopyBackupTracker (native)', function () {
|
|||
test('should hot exit (reason: RELOAD, windows: multiple, empty workspace)', function () {
|
||||
return scratchpadHotExitTest.call(this, HotExitConfiguration.ON_EXIT, ShutdownReason.RELOAD, true, false, false);
|
||||
});
|
||||
test('should NOT hot exit (reason: LOAD, windows: single, workspace)', function () {
|
||||
return scratchpadHotExitTest.call(this, HotExitConfiguration.ON_EXIT, ShutdownReason.LOAD, false, true, true);
|
||||
test('should hot exit (reason: LOAD, windows: single, workspace)', function () {
|
||||
return scratchpadHotExitTest.call(this, HotExitConfiguration.ON_EXIT, ShutdownReason.LOAD, false, true, false);
|
||||
});
|
||||
test('should NOT hot exit (reason: LOAD, windows: single, empty workspace)', function () {
|
||||
return scratchpadHotExitTest.call(this, HotExitConfiguration.ON_EXIT, ShutdownReason.LOAD, false, false, true);
|
||||
test('should hot exit (reason: LOAD, windows: single, empty workspace)', function () {
|
||||
return scratchpadHotExitTest.call(this, HotExitConfiguration.ON_EXIT, ShutdownReason.LOAD, false, false, false);
|
||||
});
|
||||
test('should NOT hot exit (reason: LOAD, windows: multiple, workspace)', function () {
|
||||
return scratchpadHotExitTest.call(this, HotExitConfiguration.ON_EXIT, ShutdownReason.LOAD, true, true, true);
|
||||
test('should hot exit (reason: LOAD, windows: multiple, workspace)', function () {
|
||||
return scratchpadHotExitTest.call(this, HotExitConfiguration.ON_EXIT, ShutdownReason.LOAD, true, true, false);
|
||||
});
|
||||
test('should NOT hot exit (reason: LOAD, windows: multiple, empty workspace)', function () {
|
||||
return scratchpadHotExitTest.call(this, HotExitConfiguration.ON_EXIT, ShutdownReason.LOAD, true, false, true);
|
||||
test('should hot exit (reason: LOAD, windows: multiple, empty workspace)', function () {
|
||||
return scratchpadHotExitTest.call(this, HotExitConfiguration.ON_EXIT, ShutdownReason.LOAD, true, false, false);
|
||||
});
|
||||
});
|
||||
|
||||
|
@ -656,14 +656,14 @@ suite('WorkingCopyBackupTracker (native)', function () {
|
|||
test('should hot exit (reason: LOAD, windows: single, workspace)', function () {
|
||||
return scratchpadHotExitTest.call(this, HotExitConfiguration.ON_EXIT_AND_WINDOW_CLOSE, ShutdownReason.LOAD, false, true, false);
|
||||
});
|
||||
test('should NOT hot exit (reason: LOAD, windows: single, empty workspace)', function () {
|
||||
return scratchpadHotExitTest.call(this, HotExitConfiguration.ON_EXIT_AND_WINDOW_CLOSE, ShutdownReason.LOAD, false, false, true);
|
||||
test('should hot exit (reason: LOAD, windows: single, empty workspace)', function () {
|
||||
return scratchpadHotExitTest.call(this, HotExitConfiguration.ON_EXIT_AND_WINDOW_CLOSE, ShutdownReason.LOAD, false, false, false);
|
||||
});
|
||||
test('should hot exit (reason: LOAD, windows: multiple, workspace)', function () {
|
||||
return scratchpadHotExitTest.call(this, HotExitConfiguration.ON_EXIT_AND_WINDOW_CLOSE, ShutdownReason.LOAD, true, true, false);
|
||||
});
|
||||
test('should NOT hot exit (reason: LOAD, windows: multiple, empty workspace)', function () {
|
||||
return scratchpadHotExitTest.call(this, HotExitConfiguration.ON_EXIT_AND_WINDOW_CLOSE, ShutdownReason.LOAD, true, false, true);
|
||||
test('should hot exit (reason: LOAD, windows: multiple, empty workspace)', function () {
|
||||
return scratchpadHotExitTest.call(this, HotExitConfiguration.ON_EXIT_AND_WINDOW_CLOSE, ShutdownReason.LOAD, true, false, false);
|
||||
});
|
||||
});
|
||||
|
||||
|
|
Loading…
Reference in a new issue