Merge from vscode a4177f50c475fc0fa278a78235e3bee9ffdec781 (#8649)

* Merge from vscode a4177f50c475fc0fa278a78235e3bee9ffdec781

* distro

* fix tests
This commit is contained in:
Anthony Dresser
2019-12-11 22:42:23 -08:00
committed by GitHub
parent 82974a2135
commit 4ba6a979ba
280 changed files with 10898 additions and 14231 deletions

View File

@@ -266,10 +266,11 @@ import { InstallVSIXAction } from 'vs/workbench/contrib/extensions/browser/exten
},
'window.newWindowDimensions': {
'type': 'string',
'enum': ['default', 'inherit', 'maximized', 'fullscreen'],
'enum': ['default', 'inherit', 'offset', 'maximized', 'fullscreen'],
'enumDescriptions': [
nls.localize('window.newWindowDimensions.default', "Open new windows in the center of the screen."),
nls.localize('window.newWindowDimensions.inherit', "Open new windows with same dimension as last active one."),
nls.localize('window.newWindowDimensions.offset', "Open new windows with same dimension as last active one with an offset position."),
nls.localize('window.newWindowDimensions.maximized', "Open new windows maximized."),
nls.localize('window.newWindowDimensions.fullscreen', "Open new windows in full screen mode.")
],

View File

@@ -609,11 +609,18 @@ export class ElectronWindow extends Disposable {
}
private trackClosedWaitFiles(waitMarkerFile: URI, resourcesToWaitFor: URI[]): IDisposable {
const listener = this.editorService.onDidCloseEditor(async () => {
const listener = this.editorService.onDidCloseEditor(async event => {
const closedResource = toResource(event.editor, { supportSideBySide: SideBySideEditor.MASTER });
// In wait mode, listen to changes to the editors and wait until the files
// are closed that the user wants to wait for. When this happens we delete
// the wait marker file to signal to the outside that editing is done.
if (resourcesToWaitFor.every(resource => !this.editorService.isOpen({ resource }))) {
if (
// for https://github.com/microsoft/vscode/issues/75861
(resourcesToWaitFor.length === 1 && isEqual(closedResource, resourcesToWaitFor[0])) ||
// any other case we simply check for all resources to wait for
resourcesToWaitFor.every(resource => !this.editorService.isOpen({ resource }))
) {
// If auto save is configured with the default delay (1s) it is possible
// to close the editor while the save still continues in the background. As such
// we have to also check if the files to wait for are dirty and if so wait