summaryrefslogtreecommitdiff
path: root/src/dump.zig
diff options
context:
space:
mode:
Diffstat (limited to 'src/dump.zig')
-rw-r--r--src/dump.zig10
1 files changed, 9 insertions, 1 deletions
diff --git a/src/dump.zig b/src/dump.zig
index 1d4ee2c2..0507fb4f 100644
--- a/src/dump.zig
+++ b/src/dump.zig
@@ -925,11 +925,17 @@ const SlotRecord = struct {
view: u64 = 0,
focused: bool = false,
told: []const u8 = "",
+ /// What a step reads of it that its kind's open made (Kind.reopen) or
+ /// a call set: its tag's default words and what it has selected. A
+ /// replica's load opens no kind; without them its tag wrapped another
+ /// way and its yank took nothing.
+ tail: []const u8 = "",
+ selection: []const u8 = "",
};
pub fn slotWrite(s: *const Kind.Slot, gpa: std.mem.Allocator, w: *std.Io.Writer) !void {
var place: [32]u8 = undefined;
- var r: SlotRecord = .{ .name = s.nameOf(), .version = s.version, .path = s.path, .art = s.art, .record = s.record, .where = s.where_text.slice(), .values = s.values.slice(), .live = s.live, .next_tick = s.next_tick, .view = s.view, .focused = s.focused, .told = s.told.slice() };
+ var r: SlotRecord = .{ .name = s.nameOf(), .version = s.version, .path = s.path, .art = s.art, .record = s.record, .where = s.where_text.slice(), .values = s.values.slice(), .live = s.live, .next_tick = s.next_tick, .view = s.view, .focused = s.focused, .told = s.told.slice(), .tail = s.tail.slice(), .selection = s.selection };
var owned: ?[]u8 = null;
defer if (owned) |o| s.gpa.free(o);
if (s.ops != null) {
@@ -972,7 +978,9 @@ pub fn slotRead(out: *Kind.Slot, gpa: std.mem.Allocator, bytes: []const u8) !voi
out.path = try gpa.dupe(u8, r.path);
out.where_text.set(r.where);
out.told.set(r.told);
+ out.tail.set(r.tail);
out.values.set(r.values);
+ out.selection = try gpa.dupe(u8, r.selection);
if (r.record) |rec| out.record = try gpa.dupe(u8, rec);
}