Update editor, themes, menus, backgrounds, and release tooling
This commit is contained in:
@@ -24,6 +24,21 @@ function setup() {
|
||||
return { docs, disk, io };
|
||||
}
|
||||
|
||||
test("background loading for a split preserves the selected document and its unsaved edits", async () => {
|
||||
const { docs } = setup();
|
||||
await docs.open(entry("note.md"));
|
||||
const first = docs.active!;
|
||||
docs.edit(first.id, "unsaved text");
|
||||
await docs.open(entry("script.py"), "background");
|
||||
assert.equal(docs.active, first);
|
||||
assert.equal(first.contents, "unsaved text");
|
||||
assert.equal(docs.buffers.length, 2);
|
||||
await assert.rejects(docs.open(entry("missing.md"), "background"));
|
||||
assert.equal(docs.active, first);
|
||||
docs.select("script.py");
|
||||
assert.equal(docs.active?.relPath, "script.py");
|
||||
});
|
||||
|
||||
test("tab moves preserve selection, dirty buffers, and in-flight saves", async () => {
|
||||
const { docs, io, disk } = setup();
|
||||
await docs.open(entry("note.md"));
|
||||
|
||||
Reference in New Issue
Block a user