diff options
Diffstat (limited to 'src/fs.zig')
| -rw-r--r-- | src/fs.zig | 11 |
1 files changed, 10 insertions, 1 deletions
@@ -598,7 +598,8 @@ test "virtual body writes can read their input from the same pane" { const path = try std.fmt.bufPrint(&path_buffer, "/virtual/pane/{d}/body", .{pane.serial}); try write(p, path, pane.file.?.content); try std.testing.expectEqualStrings("same pane contents\n", pane.file.?.content); - try std.testing.expectEqual(@as(usize, 2), pane.file.?.history.undo_len); + // The truncation and the write are one undo step. + try std.testing.expectEqual(@as(usize, 1), pane.file.?.history.undo_len); const events = &p.panes[p.active].?.fs.events; try std.testing.expect(std.mem.startsWith(u8, events.peek().?, "ED")); events.pop(); @@ -1260,9 +1261,17 @@ pub const Namespace = struct { /// the first error one reports (`failure`) fails the write, as acme's /// ctl answers a command's error (editors/acme/xfid.c:700). no_prompt: bool = false, + /// The root ctl is running a session builtin: its messages are the + /// session's, logged `msg -`, though shown on the active pane. + session_write: bool = false, refused: bool = false, failure: [256]u8 = undefined, failure_len: u16 = 0, + /// What went wrong performing a write's effects after it was answered + /// by the core (a save the host could not do): the 9P write, which + /// waits for them, fails with it (src/9p_io.zig). + late_failure: [256]u8 = undefined, + late_failure_len: u16 = 0, /// A refusal that quotes the message it refuses, as Plan 9's cmderror /// does (kernel/misc/parse.c:82); answered at once (src/9p_io.zig). ename: [320]u8 = undefined, |
