File tree Expand file tree Collapse file tree 1 file changed +10
-3
lines changed
src/vs/workbench/contrib/editSessions/browser Expand file tree Collapse file tree 1 file changed +10
-3
lines changed Original file line number Diff line number Diff line change @@ -292,15 +292,22 @@ export class EditSessionsContribution extends Disposable implements IWorkbenchCo
292
292
293
293
const shouldStoreEditSession = await that . shouldContinueOnWithEditSession ( ) ;
294
294
295
- let uri = workspaceUri ?? await that . pickContinueEditSessionDestination ( ) ;
296
- if ( uri === undefined ) { return ; }
297
-
298
295
// Run the store action to get back a ref
299
296
let ref : string | undefined ;
300
297
if ( shouldStoreEditSession ) {
301
298
ref = await that . storeEditSession ( false ) ;
302
299
}
303
300
301
+ let uri = workspaceUri ?? await that . pickContinueEditSessionDestination ( ) ;
302
+ if ( uri === undefined ) {
303
+ // If the user didn't end up picking a Continue On destination
304
+ // and we stored an edit session, clean up the stored edit session
305
+ if ( ref !== undefined ) {
306
+ void that . editSessionsStorageService . delete ( ref ) ;
307
+ }
308
+ return ;
309
+ }
310
+
304
311
// Append the ref to the URI
305
312
if ( ref !== undefined && uri !== 'noDestinationUri' ) {
306
313
const encodedRef = encodeURIComponent ( ref ) ;
You can’t perform that action at this time.
0 commit comments