Update editor, themes, menus, backgrounds, and release tooling

This commit is contained in:
Knotty Wyvern
2026-10-14 16:19:51 -07:00
parent f6eaa52949
commit edef2520af
113 changed files with 5722 additions and 386 deletions
+4 -4
View File
@@ -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) {