Skip to content
Permalink
Browse files

Ask before closing tab with unsaved changes

  • Loading branch information...
vgrichina committed May 2, 2019
1 parent ae12e52 commit 5f19b76d35feb3552cea9e5a9360d83f7c0d2132
Showing with 4 additions and 2 deletions.
  1. +4 −2 src/components/App.tsx
@@ -681,8 +681,10 @@ export class App extends React.Component<AppProps, AppState> {
openView(view, false);
}}
onClose={(view: View) => {
focusTabGroup(group);
closeView(view);
if (!view.file.isDirty || confirm(`${view.file.name} has unsaved changes, are you sure you want to close it?`)) {
focusTabGroup(group);
closeView(view);
}
}}
/>;
});

0 comments on commit 5f19b76

Please sign in to comment.
You can’t perform that action at this time.