Update editor, themes, menus, backgrounds, and release tooling
This commit is contained in:
@@ -54,9 +54,9 @@ export class Documents {
|
||||
return true;
|
||||
}
|
||||
|
||||
async open(entry: TreeEntry, target: "current" | "new" = "new") {
|
||||
const request = ++this.selection;
|
||||
const previous = target === "current" || this.active?.kind === "empty" ? this.active : undefined;
|
||||
async open(entry: TreeEntry, target: "current" | "new" | "background" = "new") {
|
||||
const request = target === "background" ? this.selection : ++this.selection;
|
||||
const previous = target !== "background" && (target === "current" || this.active?.kind === "empty") ? this.active : undefined;
|
||||
const alreadyOpen = this.buffers.some(b => b.relPath === entry.rel_path);
|
||||
if (!this.buffers.some(b => b.relPath === entry.rel_path)) {
|
||||
let pending = this.opening.get(entry.rel_path);
|
||||
@@ -77,7 +77,7 @@ export class Documents {
|
||||
}
|
||||
try { await pending; } finally { this.opening.delete(entry.rel_path); }
|
||||
}
|
||||
if (!this.disposed && request === this.selection) {
|
||||
if (target !== "background" && !this.disposed && request === this.selection) {
|
||||
// Replace only after a successful read, and never discard edits or disk conflicts.
|
||||
if (!alreadyOpen && previous && !previous.pinned && previous.contents === previous.saved
|
||||
&& previous.diskContents === undefined && !previous.diskError) {
|
||||
|
||||
Reference in New Issue
Block a user