update the UI

This commit is contained in:
2026-09-29 10:03:15 +02:00
parent 1d29d0952d
commit 2925127110
8 changed files with 219 additions and 62 deletions
@@ -19,6 +19,7 @@ import Testing
await h.store.settle()
h.store.edit("a edited")
h.store.open("b.txt")
await h.store.settle()
h.store.edit("b edited")
await h.store.settle()
#expect(h.files.current("a.txt") == "a edited")
@@ -141,9 +142,7 @@ import Testing
asked.append(path)
return path == "a.txt" ? .save : .discard
}
h.store.open("a.txt")
await h.store.settle()
h.store.edit("a2")
h.strand("a.txt", disk: "a", buffer: "a2")
h.store.open("b.txt")
await h.store.settle()
h.store.edit("b2")
@@ -158,9 +157,7 @@ import Testing
@Test func cancellingThePromptKeepsEveryEdit() async {
let h = EditorHarness(files: ["a.txt": "a", "b.txt": "b"])
h.store.confirmUnsavedClose = { $0 == "a.txt" ? .discard : .cancel }
h.store.open("a.txt")
await h.store.settle()
h.store.edit("a2")
h.strand("a.txt", disk: "a", buffer: "a2")
h.store.open("b.txt")
await h.store.settle()
h.store.edit("b2")