diff options
Diffstat (limited to 'core/Handover.zig')
| -rw-r--r-- | core/Handover.zig | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/core/Handover.zig b/core/Handover.zig index 5347fb95..bcf42c31 100644 --- a/core/Handover.zig +++ b/core/Handover.zig @@ -110,15 +110,15 @@ pub fn begin(h: *Handover, p: *Pardes, carried: Kind, at: usize) void { }, } const said = if (carried == .pane) at else ids[0]; - if (h.flying) return p.setMessage(said, "a pane is already on its way to another window"); + if (h.flying) return p.setMessage(.at(said), "a pane is already on its way to another window"); for (ids[0..n]) |id| { const pane = p.panes[id] orelse return; - if (pane.file == null) return p.setMessage(said, if (pane.isTerminal()) + if (pane.file == null) return p.setMessage(.at(said), if (pane.isTerminal()) "a terminal stays in its window: its shell is this window's child" else "only text panes go to another window, for now"); } - const bytes = dumpCarried(p, carried, at, ids[0..n], h.seq +% 1) catch |err| return p.reportError(said, "handover", err); + const bytes = dumpCarried(p, carried, at, ids[0..n], h.seq +% 1) catch |err| return p.reportError(.at(said), "handover", err); h.deinit(p.gpa); h.bytes = bytes; h.seq +%= 1; @@ -131,7 +131,7 @@ pub fn begin(h: *Handover, p: *Pardes, carried: Kind, at: usize) void { h.serials[i] = pane.serial; h.revisions[i] = pane.file.?.revision; } - p.setMessage(said, if (carried == .pane) "to a new window…" else "the column, to a new window…"); + p.setMessage(.at(said), if (carried == .pane) "to a new window…" else "the column, to a new window…"); p.emit(.{ .hand_over = .{ .seq = h.seq } }); } @@ -171,14 +171,14 @@ pub fn finish(h: *Handover, p: *Pardes, seq: u32, to: []const u8, failure: ?[]co } p.removePane(id, null) catch |err| { kept += 1; - p.reportError(id, "handover", err); + p.reportError(.at(id), "handover", err); }; } if (h.carried == .column) if (layout.columnBySerial(p, h.column_serial)) |c| { if (v.cols[c].n == 0 and v.ncol > 1) layout.dropColumn(p, c); }; layout.compute(p); - p.setMessage(v.active, if (kept == 0) + p.setMessage(.at(v.active), if (kept == 0) std.fmt.bufPrint(&buf, "moved to {s}", .{to}) catch "moved" else std.fmt.bufPrint(&buf, "copied to {s}; edited on the way, kept here too", .{to}) catch "copied"); |
