mirror of
https://github.com/Microsoft/vscode
synced 2024-09-13 21:55:38 +00:00
Merge pull request #7547 from elemongw/fix_on_activate
Open empty window on 'activate' when all windows are closed (OS X)
This commit is contained in:
commit
6588d5fe1d
|
@ -165,15 +165,9 @@ export class WindowsManager implements IWindowsService {
|
|||
app.on('activate', (event: Event, hasVisibleWindows: boolean) => {
|
||||
this.logService.log('App#activate');
|
||||
|
||||
// Mac only event: reopen last window when we get activated
|
||||
// Mac only event: open new window when we get activated
|
||||
if (!hasVisibleWindows) {
|
||||
|
||||
// We want to open the previously opened folder, so we dont pass on the path argument
|
||||
let cliArgWithoutPath = objects.clone(this.envService.cliArgs);
|
||||
cliArgWithoutPath.pathArguments = [];
|
||||
this.windowsState.openedFolders = []; // make sure we do not restore too much
|
||||
|
||||
this.open({ cli: cliArgWithoutPath });
|
||||
this.openNewWindow();
|
||||
}
|
||||
});
|
||||
|
||||
|
|
Loading…
Reference in a new issue