Merge pull request #19058 from rafeca/fix-reopen-project

Fix reopen project when there are no open windows
This commit is contained in:
Rafael Oleza
2019-03-27 16:21:45 +01:00
committed by GitHub
4 changed files with 51 additions and 7 deletions

View File

@@ -406,6 +406,10 @@ class AtomApplication extends EventEmitter {
this.on('application:check-for-update', () => this.autoUpdateManager.check())
if (process.platform === 'darwin') {
this.on('application:reopen-project', ({ paths }) => {
this.openPaths({ pathsToOpen: paths })
})
this.on('application:open', () => this.promptForPathToOpen('all', getLoadSettings(), getDefaultPath()))
this.on('application:open-file', () => this.promptForPathToOpen('file', getLoadSettings(), getDefaultPath()))
this.on('application:open-folder', () => this.promptForPathToOpen('folder', getLoadSettings(), getDefaultPath()))