未验证 提交 1cc28745 编写于 作者: B Benjamin Pasero 提交者: GitHub

Regression: Quickly closing a git commit message in VS code skips autosave,...

Regression: Quickly closing a git commit message in VS code skips autosave, causing a (fix #91709) (#91732)
上级 e5834d32
......@@ -613,6 +613,8 @@ export class ElectronWindow extends Disposable {
}
private trackClosedWaitFiles(waitMarkerFile: URI, resourcesToWaitFor: URI[]): IDisposable {
let remainingResourcesToWaitFor = resourcesToWaitFor.slice(0);
// 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.
......@@ -622,7 +624,7 @@ export class ElectronWindow extends Disposable {
// Remove from resources to wait for based on the
// resources from editors that got closed
resourcesToWaitFor = resourcesToWaitFor.filter(resourceToWaitFor => {
remainingResourcesToWaitFor = remainingResourcesToWaitFor.filter(resourceToWaitFor => {
if (isEqual(resourceToWaitFor, masterResource) || isEqual(resourceToWaitFor, detailsResource)) {
return false; // remove - the closing editor matches this resource
}
......@@ -630,7 +632,7 @@ export class ElectronWindow extends Disposable {
return true; // keep - not yet closed
});
if (resourcesToWaitFor.length === 0) {
if (remainingResourcesToWaitFor.length === 0) {
// 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
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册