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
292292
293293 const shouldStoreEditSession = await that . shouldContinueOnWithEditSession ( ) ;
294294
295- let uri = workspaceUri ?? await that . pickContinueEditSessionDestination ( ) ;
296- if ( uri === undefined ) { return ; }
297-
298295 // Run the store action to get back a ref
299296 let ref : string | undefined ;
300297 if ( shouldStoreEditSession ) {
301298 ref = await that . storeEditSession ( false ) ;
302299 }
303300
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+
304311 // Append the ref to the URI
305312 if ( ref !== undefined && uri !== 'noDestinationUri' ) {
306313 const encodedRef = encodeURIComponent ( ref ) ;
You can’t perform that action at this time.
0 commit comments