File tree Expand file tree Collapse file tree 1 file changed +6
-0
lines changed
packages/app/src/app/store/modules/editor Expand file tree Collapse file tree 1 file changed +6
-0
lines changed Original file line number Diff line number Diff line change @@ -3,6 +3,8 @@ import slugify from '@codesandbox/common/lib/utils/slugify';
33import { clone } from 'mobx-state-tree' ;
44import { dispatch } from 'codesandbox-api' ;
55
6+ import vscode from 'app/vscode' ;
7+
68import getTemplate from '@codesandbox/common/lib/templates' ;
79import { getTemplate as computeTemplate } from 'codesandbox-import-utils/lib/create-sandbox/templates' ;
810
@@ -321,6 +323,10 @@ export function moveTab({ state, props }) {
321323}
322324
323325export function unsetDirtyTab ( { state } ) {
326+ if ( state . get ( 'preferences.settings.experimentVSCode' ) ) {
327+ vscode . runCommand ( 'workbench.action.keepEditor' ) ;
328+ }
329+
324330 const currentModule = state . get ( 'editor.currentModule' ) ;
325331 const tabs = state . get ( 'editor.tabs' ) ;
326332 const tabIndex = tabs . findIndex (
You can’t perform that action at this time.
0 commit comments